home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tchk21.arc / TCHKF.DOC < prev    next >
Text File  |  1989-06-20  |  457KB  |  25,213 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.      TCHK 2.1                                                    Page 1
  7.  
  8.   
  9.                               Table of Contents
  10.   
  11.   
  12.        accum_dep - calculate accumulated depreciation  ................   8
  13.        ansi_call - create an ANSI escape sequence  ....................   9
  14.        ansiback - convert DOS background code to ANSI  ................  11
  15.        ansifore - convert DOS foreground code to ANSI  ................  12
  16.        atrim - trims leading and trailing blanks  .....................  13
  17.        average - calculate the average of a set of reals  .............  14
  18.        beep - generate a standard IBM PC beep  ........................  15
  19.        bitrevb - bit reverse a byte  ..................................  16
  20.        bitrevl - bit reverse a long  ..................................  17
  21.        bitrevw - bit reverse a word  ..................................  18
  22.        box - draw a box  ..............................................  19
  23.        boxwindow - draw a 'window'  ...................................  20
  24.        Cal... - family of Calendar date conversions  ..................  22
  25.        CapsLock - set the Caps Lock key state  ........................  23
  26.        CEDadd - add a CED installable command  ........................  24
  27.        CEDremove - remove a CED installable command  ..................  25
  28.        center - coordinate to center a message on screen  .............  26
  29.        changelitebar - set internal litebar menu   ....................  27
  30.        Checksum_block - calculate checksum for a block  ...............  28
  31.        clear - clears a portion of the screen  ........................  29
  32.        clear_typeahead - clear typeahead buffer  ......................  30
  33.        cls - clear screen  ............................................  31
  34.        color - make a single attribute  ...............................  32
  35.        commit - flush disk buffers for to a handle  ...................  33
  36.        Compaq386GetCpuSpeed - get cpu speed on a  .....................  34
  37.        Compaq386KbdType - keyboard type used by a  ....................  35
  38.        Compaq386SetCpuSpeed - get cpu speed on a  .....................  36
  39.        CompaqExternalMonitorType - Get external monitor  ..............  37
  40.        CompaqGetMasterMode - Get master mode of current  ..............  38
  41.        CompaqGetMonitor - Get active monitor  .........................  39
  42.        CompaqInternalMonitorType - Get internal monitor  ..............  40
  43.        CompaqModeSwitchDelay - Set mode switch delay  .................  41
  44.        CompaqSelectMonitor - Select active monitor  ...................  42
  45.        CompaqSetMasterMode - Set master mode of current  ..............  43
  46.        cpu_id - identify the cpu  .....................................  44
  47.        CRC16_block - calculate CRC-16 for a block  ....................  45
  48.        CRC16tupdate - update a CRC-16 value via tables  ...............  46
  49.        CRC16update - update a CRC-16 value  ...........................  47
  50.        CRC32tupdate - update a CRC-32 value via tables  ...............  48
  51.        cursor_blink - set speed of cursor blink  ......................  49
  52.        cursor_flip - toggle the cursor type  ..........................  50
  53.        cursor_off - turn the cursor off  ..............................  51
  54.        cursor_on - turn the cursor on  ................................  52
  55.        date_convert - convert date formats  ...........................  53
  56.        dayofweek - find the day of the week  ..........................  54
  57.        dayofyear - calculate the day of the year  .....................  55
  58.        daysleft - calculate the days left in the year  ................  56
  59.        ddatetofull - convert a date to full string  ...................  57
  60.        ddatetoshort - convert a date to short string  .................  58
  61.        ddatetostr - convert a date to abbrev. string  .................  59
  62.        depreciation - calculate depreciation for a  ...................  60
  63.        DESQapilevel - define minimum API level required  ..............  61
  64.   
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.      TCHK 2.1                                                    Page 2
  73.  
  74.        DESQappnum - DESQview program number  ..........................  62
  75.        DESQbeginc - begin critical section  ...........................  63
  76.        DESQcommonmem - returns measure of common memory  ..............  64
  77.        DESQconvenmem - returns measure of conventional  ...............  65
  78.        DESQdisperror - popup a DESQview error window  .................  66
  79.        DESQendc - end critical section  ...............................  67
  80.        DESQexit - exit program in DESQview  ...........................  68
  81.        DESQexpandedmem - returns measure of expanded  .................  69
  82.        DESQgetbuf - get DESQview virtual screen info  .................  70
  83.        DESQgetmem - allocate DESQview "system" memory  ................  71
  84.        DESQiskmouse - is mouse emulated via keyboard  .................  72
  85.        DESQjustify - set automatic window justification  ..............  73
  86.        DESQkmouse_off - disable keyboard mouse emulation  .............  74
  87.        DESQkmouse_on - enable keyboard mouse emulation  ...............  75
  88.        DESQostack - switch to DESQview's internal stack  ..............  76
  89.        DESQpause - give up CPU time  ..................................  77
  90.        DESQpoke - displays a char on the status line  .................  78
  91.        DESQposttask - awaken DESQview task  ...........................  79
  92.        DESQpushkey - put key into keyboard input stream  ..............  80
  93.        DESQputmem - deallocate DESQview "system" memory  ..............  81
  94.        DESQsound - makes a tone under DESQview  .......................  82
  95.        DESQstart - start (unFreeze) a task  ...........................  83
  96.        DESQstop - stop (Freeze) the current task  .....................  84
  97.        DESQustack -  switch back to program's stack  ..................  85
  98.        DESQversion - DESQview version  ................................  86
  99.        diffddate - calculate the difference in 2 dates  ...............  87
  100.        diskchanged - has the disk has been changed  ...................  88
  101.        disktype - identify disk type  .................................  89
  102.        dosday - extract day from file date stamp  .....................  90
  103.        doshour - extract hour from file time stamp  ...................  91
  104.        dosmonth - extract hour from file date stamp  ..................  92
  105.        dosmin - extract minutes from file time stamp  .................  93
  106.        dossec - extract seconds from file time stamp  .................  94
  107.        dostimetolong - convert DOS time to 1/100 seconds  .............  95
  108.        dosyear - extract year from file date stamp  ...................  96
  109.        double_decline_bal_dep - calculate double  .....................  97
  110.        DoubleDOSfreeCPU - give up CPU time under  .....................  98
  111.        DoubleDOSGetVirtual - get DoubleDOS virtual  ...................  99
  112.        DoubleDOSTaskSwitch - set Double DOS task  ..................... 100
  113.        EMMversion - version of Expanded Memory Manager  ............... 101
  114.        EMSGetStatus - get Expanded Memory status  ..................... 102
  115.        EMSinfo - determines EMM version and EMS pages  ................ 103
  116.        EMSpages - determines the total and available  ................. 104
  117.        EMSwarmbootprep - prepares the EMM for warm boot  .............. 105
  118.        endstri - get offset to last char of a string  ................. 106
  119.        endstrp - get pointer to last char of a string  ................ 107
  120.        expandfilespec - expand a filespec into a full  ................ 108
  121.        Extendedtotal - total Extended memory installed  ............... 109
  122.        factorial - determines a factorial (n!)  ....................... 110
  123.        fileexist - does a file exist  ................................. 111
  124.        fname_match - compare filenames w/wildcards  ................... 112
  125.        fncmp - compare filenames w/wildcards  ......................... 113
  126.        frac - round the fractional portion of a real  ................. 114
  127.        fsgn - sign of a real  ......................................... 115
  128.   
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.      TCHK 2.1                                                    Page 3
  139.  
  140.        fulltoddate - convert a full date to struct  ................... 116
  141.        FV - calculate the Future Value of a single amount  ............ 117
  142.        FVa - calculate the Future Value of an annuity  ................ 118
  143.        getAssignmemseg - get ASSIGN work area segment  ................ 119
  144.        getBootBlock - get Boot Block  ................................. 120
  145.        getBootBlock4 - get Boot Block under DOS 4.x  .................. 121
  146.        getBPB - get Bios Parameter Block  ............................. 122
  147.        getc_match - get specific input, case dependent  ............... 123
  148.        getci_match - get specific input, case  ........................ 124
  149.        getcursor - gets cursor scan lines  ............................ 125
  150.        getdatehk - inputs a date from the keyboard  ................... 126
  151.        getdouble - inputs a double from the keyboard  ................. 127
  152.        getfilespec - get a DIR proper filespec  ....................... 128
  153.        getfname - get a filename from the keyboard  ................... 129
  154.        getget - get a string from the keyboard w/editing  ............. 130
  155.        getint - inputs an integer from the keyboard  .................. 133
  156.        getk - get a key  .............................................. 134
  157.        getlogical - get Yes/No  ....................................... 135
  158.        getpw - inputs a password from the keyboard  ................... 136
  159.        getreal - inputs a real from the keyboard  ..................... 137
  160.        getstr - input a string from the keyboard  ..................... 138
  161.        GetTypePointDevice - Pointing Device BIOS  ..................... 139
  162.        getVolSerialNum - get Volume Serial Number  .................... 140
  163.        getyn - get Yes/No  ............................................ 141
  164.        gotohv - move cursor to absolute coordinates  .................. 142
  165.        Greg... - family of Gregorian date conversion  ................. 143
  166.        horiz_line - draw a horizontal line  ........................... 144
  167.        initkeyvars - setup internal keyboard settings  ................ 145
  168.        inkey - get a key  ............................................. 146
  169.        inkeyc - get a key, any alphabetics capitalized  ............... 147
  170.        inkeycdv - get a key, any alphabetics  ......................... 148
  171.        inkeydv - get a key, DESQview aware  ........................... 149
  172.        intlen - calculate length of integer in a string  .............. 150
  173.        InsLock - set the Insert key state  ............................ 151
  174.        is2nd8259 - is a 2nd 8259 chip installed  ...................... 152
  175.        isallalpha - are all characters in string  ..................... 153
  176.        isallalphanum - are all characters in string  .................. 154
  177.        isalllower - are all characters in string  ..................... 155
  178.        isallupper - are all characters in string  ..................... 156
  179.        isAnarkey - is ANARKEY.COM by Steven Calwas  ................... 157
  180.        isAppendavail - is APPEND installed  ........................... 158
  181.        isAssignavail - is ASSIGN installed  ........................... 159
  182.        isAutoPark - is AUTOPARK.COM by Alan D. Jones  ................. 160
  183.        isBlogical - is drive B: logical  .............................. 161
  184.        isBREAKon - check Ctrl-BREAK flag  ............................. 162
  185.        iscdevicemoderaw - is character device in "raw"  ............... 163
  186.        isCEDavail - is CED installed  ................................. 164
  187.        isCGA - is Color Graphics adapter installed  ................... 165
  188.        isEGA - is Enhanced Graphics adapter installed  ................ 165
  189.        isHerc - is Hercules Graphics adapter installed  ............... 165
  190.        isMDA - is Monochrome adapter installed  ....................... 165
  191.        ismono - is monochrome display  ................................ 165
  192.        iscolor - is color display  .................................... 165
  193.        isdate - character classification  ............................. 166
  194.   
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.      TCHK 2.1                                                    Page 4
  205.  
  206.        isdir - is a FAT entry a subdirectory  ......................... 167
  207.        isDoubleDOS - is DoubleDOS installed  .......................... 168
  208.        isdrivelocal - is drive local or remote  ....................... 169
  209.        isDriverSys - is DRIVER.SYS installed  ......................... 170
  210.        isEMSavail - is EMS available  ................................. 171
  211.        isEnhanceKbd - is an enhanced keyboard installed  .............. 172
  212.        iseven - is a number even  ..................................... 173
  213.        isExtended - is Extended memory installed  ..................... 174
  214.        isfilename - character classification  ......................... 175
  215.        isgameport - is a game port installed  ......................... 176
  216.        isgn - sign of an integer  ..................................... 177
  217.        ishandlelocal - is handle local or remote  ..................... 178
  218.        isHiliteable - can a menu command be hilighted  ................ 179
  219.        isInvisible - is this the invisible program under  ............. 180
  220.        isleapyear - is a year a leap year  ............................ 181
  221.        isMCA - is the bus Micro Channel Architecture  ................. 182
  222.        ismouse - is a mouse installed  ................................ 183
  223.        isNetwork - is a network installed  ............................ 184
  224.        isNLSFuncCom - is NLSFUNC.COM installed  ....................... 185
  225.        isNovellNetavail - is Novell Network installed  ................ 186
  226.        isodd - is a number odd  ....................................... 187
  227.        ispathname - character classification  ......................... 188
  228.        ispcAnywhere - is pcAnywhere installed  ........................ 189
  229.        isPRINTavail - is PRINT.COM installed  ......................... 190
  230.        isPM - the the hour AM or PM  .................................. 191
  231.        isrealtimeclock - is a real time clock installed  .............. 192
  232.        isRedirectStdin - is stdin redirected  ......................... 193
  233.        isRedirectStdout - is stdout redirected  ....................... 194
  234.        isremoveable - is device removeable  ........................... 195
  235.        isScrnSav2 - is SCRNSAV2.COM by Alan Ballard  .................. 196
  236.        isShareavail - is SHARE installed  ............................. 197
  237.        isstate - is string a state abbreviation  ...................... 198
  238.        isVERIFYon - check VERIFY flag  ................................ 199
  239.        isVidclock - is VIDCLOCK.COM by Tom Hanlin  .................... 200
  240.        isWhoa - is WHOA!.COM by Brad Crandall installed  .............. 201
  241.        iswildcarded - checks a string for DOS wildcards  .............. 202
  242.        isXMSinstalled - is XMS installed  ............................. 203
  243.        iszip - is a zip code valid for a state  ....................... 204
  244.        joystickAx - read joystick input Ax  ........................... 205
  245.        joystickAy - read joystick input Ay  ........................... 206
  246.        joystickBx - read joystick input Bx  ........................... 207
  247.        joystickBy - read joystick input By  ........................... 208
  248.        joysticksettings - read joystick switch settings  .............. 209
  249.        Jul... - family of Julian date conversion  ..................... 210
  250.        keyclick - turn on key click  .................................. 211
  251.        leftstr - return the left portion of a string  ................. 212
  252.        litebar_alloc - allocate memory for a litebar  ................. 213
  253.        litebar_free - frees memory allocated by a  .................... 217
  254.        litebar_get - get user's choice from a litebar  ................ 218
  255.        litehilite - hilite a litebar menu command  .................... 219
  256.        litemessage - change the message for a litebar  ................ 220
  257.        liteunlite - unhilite a litebar menu command  .................. 221
  258.        longtodostime - convert 1/100 seconds to DOS time  ............. 222
  259.        lpow - raise a base to an exponent  ............................ 223
  260.   
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.      TCHK 2.1                                                    Page 5
  271.  
  272.        lsgn - sign of a long integer  ................................. 224
  273.        ltrim - trims leading blanks  .................................. 225
  274.        machine_id - determine machine type  ........................... 226
  275.        MButtonPress - mouse button press data  ........................ 227
  276.        MButtonRelease - mouse button release data  .................... 228
  277.        MButtonStatus - mouse position and button status  .............. 229
  278.        MCursorGraphic - define graphic cursor  ........................ 230
  279.        MCursorOff - turns off (hide) the mouse cursor  ................ 231
  280.        MCursorOn - turns on (show) the mouse cursor  .................. 232
  281.        MCursorRangex - define horizontal cursor range  ................ 233
  282.        MCursorRangey - define vertical cursor range  .................. 234
  283.        MCursorText - define text cursor  .............................. 235
  284.        MDriverSize - get driver storage requirements  ................. 236
  285.        memory_strategy - get/set memory alloc strategy  ............... 237
  286.        MEmulateLightpenOff - mouse light pen emulation  ............... 238
  287.        MEmulateLightpenOn - mouse light pen emulation on  ............. 239
  288.        menu_litebar - litebar style menu  ............................. 240
  289.        menu_popup - popup style menu  ................................. 241
  290.        MGetDisplayPage - get mouse display page number  ............... 242
  291.        MGetDriver - save mouse driver state  .......................... 243
  292.        MGetSensitivity - get mouse sensitivity  ....................... 244
  293.        MGetVerType - get software version and mouse type  ............. 245
  294.        MGotoxy - position mouse cursor  ............................... 246
  295.        mid - is a number within a range  .............................. 247
  296.        midstr - return the middle portion of a string  ................ 248
  297.        MMickeysMovedx - number of mickeys mouse moved  ................ 249
  298.        MMickeysMovedy - number of mickeys mouse moved  ................ 250
  299.        monthexpand - convert a month abbrev to its name  .............. 251
  300.        MouseReset - reset mouse software only  ........................ 252
  301.        MPutDriver - restore mouse driver state  ....................... 253
  302.        MSetDisplayPage - set mouse display page number  ............... 254
  303.        MSetRatio - set mickey to pixel ratio  ......................... 255
  304.        MSetSensitivity - set mouse sensitivity  ....................... 256
  305.        MSetThreshold - set double speed threshold  .................... 257
  306.        MUpdateScreen - define screen region for updating  ............. 258
  307.        ndp_id - identify the math coprocessor  ........................ 259
  308.        nmid - is a number outside a range  ............................ 260
  309.        NumLock - set the Num Lock key state  .......................... 261
  310.        parsefilename - parses a filename, supports paths  ............. 262
  311.        parsefnameext - parses a filename into name and  ............... 264
  312.        pause - wait for a time or until a keypress  ................... 265
  313.        PMT - calculate the periodic payment required to  .............. 266
  314.        popup_alloc - allocate memory for a popup menu  ................ 267
  315.        popup_free - frees memory allocated by popup menu  ............. 271
  316.        popup_get - get user's choice from a popup menu  ............... 272
  317.        popup_restore - restore video from a popup menu  ............... 273
  318.        popup_setcurrent - set internal popup menu  .................... 274
  319.        pophilite - hilite a popup menu command  ....................... 275
  320.        popunlite - unhilite a popup menu command  ..................... 276
  321.        print_screen - issue a PrintScreen  ............................ 277
  322.        PRINTadd - add a file to the print queue  ...................... 278
  323.        PRINThold - hold print queue for status read  .................. 279
  324.        PRINTpurge - remove all files from print queue  ................ 280
  325.        PRINTremove - remove a file from print queue  .................. 281
  326.   
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.      TCHK 2.1                                                    Page 6
  337.  
  338.        PRINTresume - resume printing after a PRINThold  ............... 282
  339.        putk - put a character w/attribute on the screen  .............. 283
  340.        putsay - put a string with attribute on the  ................... 284
  341.        putstr - put string with attribute on the screen  .............. 285
  342.        PV - calculate the Present Value of a single  .................. 286
  343.        PVa - calculate the Present Value of an annuity  ............... 287
  344.        radd - add two REAL numbers  ................................... 288
  345.        rceil - rounds up  ............................................. 289
  346.        rdiv - divide using REAL math  ................................. 290
  347.        read_attrib - gets the attribute under the cursor  ............. 291
  348.        read_char - gets the character under the cursor  ............... 292
  349.        read_cursor - reads cursor information  ........................ 293
  350.        read_mode - find screen width, mode and page  .................. 294
  351.        reboot - reboots the machine  .................................. 295
  352.        ResetPointDevice - Pointing Device BIOS Interface  ............. 296
  353.        resolvepath - resolve a path to a fully qualified  ............. 297
  354.        rfloor - rounds down  .......................................... 298
  355.        rightstr - return the right portion of a string  ............... 299
  356.        rnegate - change sign  ......................................... 300
  357.        rnormalize - fix precision  .................................... 301
  358.        ROM_date - gets the ROM id date  ............................... 302
  359.        ROM_id - gets the ROM id byte  ................................. 303
  360.        round - round a real to a decimal place  ....................... 304
  361.        rsign - determine the sign of a REAL number  ................... 305
  362.        rsub - subtract two REAL numbers  .............................. 306
  363.        rtrim - trims trailing blanks  ................................. 307
  364.        scrbuff - calculate size of screen buffer  ..................... 308
  365.        scroll_down - scroll window down  .............................. 309
  366.        scroll_up - scroll window up  .................................. 310
  367.        ScrollLock - set the Scroll Lock key state  .................... 311
  368.        set_color - set the default attribute (color)  ................. 312
  369.        set_cursor - sets cursor scan lines  ........................... 313
  370.        set_handles - set handle count  ................................ 314
  371.        set_mode - set the video mode  ................................. 315
  372.        setAutoPark - set parking delay for AUTOPARK.COM  .............. 316
  373.        setBREAK - set Ctrl-BREAK flag  ................................ 317
  374.        setcdevicemoderaw - set character device mode  ................. 318
  375.        setcursor - sets cursor scan lines  ............................ 319
  376.        SetpcAnywhere - enable/disable pcAnywhere  ..................... 320
  377.        SetPointDevice - Pointing Device BIOS Interface:  .............. 321
  378.        SetRatePointDevice - Pointing Device BIOS  ..................... 322
  379.        SetResPointDevice - Pointing Device BIOS  ...................... 323
  380.        settextinfo - set text mode video information  ................. 324
  381.        setVERIFY - set VERIFY flag  ................................... 325
  382.        setWhoa - set delay count for WHOA!.COM by Brad  ............... 326
  383.        shadow - draw a shadowed box  .................................. 327
  384.        shorttoddate - convert a short date to struct  ................. 329
  385.        soundex - convert a string to soundex form  .................... 330
  386.        sqr - square of a value  ....................................... 332
  387.        stateindex - get index for a given state  ...................... 333
  388.        stddev - calculate the standard deviation of a  ................ 334
  389.        straight_line_dep - calculate straight line  ................... 335
  390.        strcapital - capitalizes the first letter of each  ............. 336
  391.        strclean - remove non-printable ASCII codes  ................... 337
  392.   
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.      TCHK 2.1                                                    Page 7
  403.  
  404.        strcomma - convert a string to xx,xxx,xxx format  .............. 338
  405.        strdel - delete part of a string  .............................. 339
  406.        strfill - fill a string with a character  ...................... 340
  407.        strins - insert one string into another  ....................... 341
  408.        stroccur - count the occurences of a substring  ................ 342
  409.        strpadleft - pad the left of a string  ......................... 343
  410.        strpadright - pad the right of a string  ....................... 344
  411.        strrep - replicate a char  ..................................... 345
  412.        strshleft - shift string left  ................................. 346
  413.        strshright - shift string right  ............................... 347
  414.        strspace2tab - compress spaces to tabs  ........................ 348
  415.        strtabexpand - expand tabs to spaces  .......................... 349
  416.        strtocomma - convert a string to xx,xxx format  ................ 350
  417.        strtoddate - convert a date string to a structure  ............. 351
  418.        strtodol - converts a string to dollar format  ................. 352
  419.        strtotime - convert a string to a time structure  .............. 353
  420.        strwcmp - compares a wild-carded string to  .................... 354
  421.        strwicmp - compares a wild-carded string to  ................... 355
  422.        sum_year_digits_dep - calculate sum of the years  .............. 356
  423.        summation - calculate a summation of integers  ................. 357
  424.        swap - swap two values  ........................................ 358
  425.        time_convert - convert time formats  ........................... 359
  426.        timetostr - convert time structure to a string  ................ 360
  427.        to24hour - converts hours to 24-hour format  ................... 361
  428.        tocapkey - convert the key code to uppercase  .................. 362
  429.        todosdate - make a DOS file date stamp  ........................ 363
  430.        todostime - make a DOS file time stamp  ........................ 364
  431.        tohour - converts 24-hour format to 12-hour  ................... 365
  432.        Tone - play a tone  ............................................ 366
  433.        uninstallWhoa - uninstall WHOA!.COM by Brad  ................... 367
  434.        valid_date - check if a date is valid  ......................... 368
  435.        variance - calculate the variance of a set of  ................. 369
  436.        vert_line - draw a vertical line  .............................. 370
  437.        whereh - X-coordinate of cursor   .............................. 371
  438.        wherev - Y-coordinate of cursor   .............................. 372
  439.   
  440.   Index  .............................................................. 373
  441.   
  442.   
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.      TCHK 2.1                                                    Page 8
  469.  
  470.   
  471.   Function             accum_dep - calculate accumulated depreciation
  472.   
  473.   Syntax              double accum_dep(double cost, double salvage, int
  474.                                        life, int period, int dtype);
  475.   
  476.   Prototype in        finance.h
  477.   
  478.   Remarks             given the cost, salvage value and life of an item,
  479.                       accum_dep will calculate the amount of accumulated
  480.                       depreciation for the given period according to the
  481.                       depreciation method specified by dtype. The cost and
  482.                       salvage can be given in any unit (dollars, thousands
  483.                       of dollars, etc.) but the life should be given in
  484.                       depreciable periods (if you depreciate an item every
  485.                       quarter, and the item has a life of 2 years, then
  486.                       life should be 8).
  487.   
  488.                       The cost and salvage values should be in the same
  489.                       units. The life and period should be given in the
  490.                       same units.
  491.   
  492.                       Types of depreciation supported by the variable
  493.                       dtype are:
  494.   
  495.                            1 -  Straight line depreciation
  496.                            2 -  Sum of the years digits depreciation
  497.                            3 -  Double declining balance depreciation
  498.   
  499.                       Any other value for dtype will produce unpredictable
  500.                       results.
  501.   
  502.                       No error checking is performed.
  503.   
  504.                       This is a generic function to calculate the
  505.                       accumulated depreciation given all necessary
  506.                       information. Any unnecessary information is ignored
  507.                       (i.e. double declining balance does not need a
  508.                       salvage value.)
  509.   
  510.   Return value        returns the amount of depreciation for the given
  511.                       period in the same units as the cost, as per the
  512.                       depreciation method specified by dtype.
  513.   
  514.   Note                The macros ACC_DDB(c,l,p), ACC_SLD(c,s,l) and
  515.                       ACC_SYD(c,s,l,p) are defined in finance.h for ease
  516.                       of use.
  517.   
  518.   See also            depreciation(), double_decline_bal_dep(),
  519.                       straight_line_dep(), sum_year_digits_dep()
  520.   
  521.   Example             see demonum.c
  522.   
  523.   
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.      TCHK 2.1                                                    Page 9
  535.  
  536.   
  537.   Function             ansi_call - create an ANSI escape sequence
  538.   
  539.   Syntax              char *ansi_call(int subfunction, int parm1, int
  540.                                       parm2, char *ansistring);
  541.   
  542.   Prototype in        ansihk.h
  543.   
  544.   Remarks             ansi_call is a general function that will create an
  545.                       ANSI escape sequence for the given subfunction:
  546.   
  547.                             1: gotoxy(parm1,parm2)
  548.                             2: cursor_right
  549.                             3: cursor_left
  550.                             4: cursor_up
  551.                             5: cursor_down
  552.                             6: save_cursor_position
  553.                             7: restore_cursor_position
  554.                             8: cls()
  555.                             9: clear_eol()
  556.                            10: set_foreground(parm1)
  557.                            11: set_background(parm1)
  558.                            12: clear_attributes     (plain, normal)
  559.                            13: bold
  560.                            14: faint
  561.                            15: italic
  562.                            16: blink
  563.                            17: fast_blink
  564.                            18: inverse
  565.                            19: invisible
  566.                            20: set_mode(parm1)
  567.                            21: reset_mode(parm1)
  568.                            22: wherexy()
  569.   
  570.                            1: moves cursor to (parm1,parm2)
  571.                          2-5: move cursor 1 space in direction indicated
  572.                          6-7: save cursor position for future restoring
  573.                            8: clear screen
  574.                            9: clear to the end of current line
  575.                        10-11: set colors for output
  576.                  12-15,18-19: set attributes for output
  577.                        16-17: control cursor blink rate
  578.                        20-21: change mode (not same as DOS, see ansihk.h)
  579.                           22: outputs the current cursor location
  580.   
  581.                       A value must be passed for parm1 and parm2, even if
  582.                       they are not going to be used.
  583.   
  584.                       The escape sequence ansistring can be outputted
  585.                       with a simple printf().
  586.   
  587.                       Remember, ANSI.SYS, FANSI-CONSOLE, or some similar
  588.                       ANSI control sequence program must be active for
  589.                       these codes to take effect.
  590.   
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.      TCHK 2.1                                                    Page 10
  601.  
  602.   
  603.   Return value        returns ansistring.
  604.   
  605.   Note                The color codes needed by ANSI functions are NOT
  606.                       the same as the color codes used by DOS to set
  607.                       attributes. Use the ANSI color #defines given in
  608.                       ansihk.h.
  609.   
  610.   See also            ansiback(), ansifore()
  611.   
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.      TCHK 2.1                                                    Page 11
  667.  
  668.   
  669.   Function             ansiback - convert DOS background code to ANSI
  670.   
  671.   Syntax              int ansiback(char code);
  672.   
  673.   Prototype in        ansihk.h
  674.   
  675.   Remarks             DOS and ANSI use different values for colors. This
  676.                       function converts a DOS background color code to
  677.                       the ANSI color code for the same color.
  678.   
  679.   Return value        returns the ANSI background color code
  680.   
  681.   See also            ansi_call(), ansifore()
  682.   
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.      TCHK 2.1                                                    Page 12
  733.  
  734.   
  735.   Function             ansifore - convert DOS foreground code to ANSI
  736.   
  737.   Syntax              int ansifore(char code);
  738.   
  739.   Prototype in        ansihk.h
  740.   
  741.   Remarks             DOS and ANSI use different values for colors. This
  742.                       function converts a DOS foreground color code to
  743.                       the ANSI color code for the same color.
  744.   
  745.   Return value        returns the ANSI foreground color code
  746.   
  747.   See also            ansi_call(), ansiback()
  748.   
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.      TCHK 2.1                                                    Page 13
  799.  
  800.   
  801.   Function             atrim - trims leading and trailing blanks
  802.   
  803.   Syntax              char *atrim(char *source);
  804.   
  805.   Prototype in        stringhk.h
  806.   
  807.   Remarks             remove leading and trailing blanks in a string. The
  808.                       string passed to atrim (source) is modified.
  809.   
  810.   Return value        returns a pointer to source.
  811.   
  812.   Example             #include <stringhk.h>
  813.                       #include <stdio.h>            /* for the printf */
  814.   
  815.                       main()
  816.                       {
  817.                            char msg[25] = "  Hello everyone   ";
  818.                            printf("String [%s]\n",msg);
  819.                            printf("atrim  [%s]\n",atrim(msg));
  820.                       }
  821.        
  822.   Program output      String [  Hello everyone   ]
  823.                       atrim  [Hello everyone]
  824.   
  825.   
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.      TCHK 2.1                                                    Page 14
  865.  
  866.   
  867.   Function             average - calculate the average of a set of reals
  868.   
  869.   Syntax              double average(int n, double element[]);
  870.   
  871.   Prototype in        mathhk.h
  872.   
  873.   Remarks             average calculates the average of a set of n
  874.                       numbers of type double.
  875.   
  876.   Return value        returns the average of a set of n numbers.
  877.   
  878.   See also            stddev(), summation(), variance()
  879.   
  880.   Example             #include <mathhk.h>
  881.   
  882.                       main()
  883.                       {
  884.                            double num[] = { 2.3, 7.1, 6.05 };
  885.   
  886.                            printf("Average is %lf\n",average(3,num));
  887.                       }
  888.   
  889.   Program output      Average is 5.15
  890.   
  891.   
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.      TCHK 2.1                                                    Page 15
  931.  
  932.   
  933.   Function             beep - generate a standard IBM PC beep
  934.   
  935.   Syntax              void beep(void);
  936.   
  937.   Prototype in        sound.h
  938.   
  939.   Remarks             makes the speaker beep (just like the beep during
  940.                       bootup).
  941.   
  942.   See also            Tone()
  943.   
  944.   Return value        nothing.
  945.   
  946.   
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.      TCHK 2.1                                                    Page 16
  997.  
  998.   
  999.   Function             bitrevb - bit reverse a byte
  1000.   
  1001.   Syntax              unsigned char bitrevb(unsigned char value);
  1002.   
  1003.   Prototype in        mathhk.h
  1004.   
  1005.   Remarks             bitrevb() will reverse the bits in the byte value.
  1006.   
  1007.   Return value        returns the reversed byte.
  1008.   
  1009.   See also            bitrevl(), bitrevw()
  1010.   
  1011.   Example             #include <mathhk.h>
  1012.   
  1013.                       main()
  1014.                       {
  1015.                            printf("0x01 reversed => 0x%02X\n",
  1016.                                   bitrevb(0x01));
  1017.                       }
  1018.   
  1019.   Program output      0x01 reversed => 0x80
  1020.   
  1021.   
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.      TCHK 2.1                                                    Page 17
  1063.  
  1064.   
  1065.   Function             bitrevl - bit reverse a long
  1066.   
  1067.   Syntax              unsigned char bitrevl(unsigned long value);
  1068.   
  1069.   Prototype in        mathhk.h
  1070.   
  1071.   Remarks             bitrevl() will reverse the bits in the double word
  1072.                       (long) value.
  1073.   
  1074.   Return value        returns the reversed long.
  1075.   
  1076.   See also            bitrevb(), bitrevw()
  1077.   
  1078.   Example             #include <mathhk.h>
  1079.   
  1080.                       main()
  1081.                       {
  1082.                            printf("0x00000001 reversed => 0x%08X\n",
  1083.                                   bitrevb(0x00000001));
  1084.                       }
  1085.   
  1086.   Program output      0x00000001 reversed => 0x80000000
  1087.   
  1088.   
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.      TCHK 2.1                                                    Page 18
  1129.  
  1130.   
  1131.   Function             bitrevw - bit reverse a word
  1132.   
  1133.   Syntax              unsigned char bitrevw(unsigned int value);
  1134.   
  1135.   Prototype in        mathhk.h
  1136.   
  1137.   Remarks             bitrevw() will reverse the bits in the word value.
  1138.   
  1139.   Return value        returns the reversed word.
  1140.   
  1141.   See also            bitrevb(), bitrevl()
  1142.   
  1143.   Example             #include <mathhk.h>
  1144.   
  1145.                       main()
  1146.                       {
  1147.                            printf("0x0001 reversed => 0x%04X\n",
  1148.                                   bitrevb(0x0001));
  1149.                       }
  1150.   
  1151.   Program output      0x0001 reversed => 0x8000
  1152.   
  1153.   
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.      TCHK 2.1                                                    Page 19
  1195.  
  1196.   
  1197.   Function             box - draw a box
  1198.   
  1199.   Syntax              int box(int left, int top, int right, int bottom,
  1200.                               char frame[]);
  1201.   
  1202.   Prototype in        video.h
  1203.   
  1204.   Remarks             draws a box via gotohv(), horiz_line(), putk() and
  1205.                       vert_line() (all use INTerrupts). Also, frame must
  1206.                       be have at least 9 elements (char frame[9]). The
  1207.                       box characters are frame[0] (top left) to frame[7]
  1208.                       (left wall), going clockwise. If frame[8] != '\0'
  1209.                       the box is filled with it.
  1210.   
  1211.   Return value        returns zero upon succesful completion, -1 if the
  1212.                       coordinates given are not large enough for a box.
  1213.   
  1214.   See also            global variables
  1215.                       boxwindow(), gotohv(), horiz_line(), putk(),
  1216.                       vert_line()
  1217.   
  1218.   Example             #include <video.h>
  1219.   
  1220.                       main()
  1221.                       {
  1222.                            char framebox[9] = "abcdefghi";
  1223.   
  1224.                            box(1,1,7,4,framebox);
  1225.                       }
  1226.   
  1227.   Program output      abbbbbc
  1228.                       hiiiiid
  1229.                       hiiiiid
  1230.                       gfffffe
  1231.   
  1232.   
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.      TCHK 2.1                                                    Page 20
  1261.  
  1262.   
  1263.   Function             boxwindow - draw a 'window'
  1264.   
  1265.   Syntax              int boxwindow(int left, int top, int right, int
  1266.                                     bottom, char frame[], char *title,
  1267.                                     int titlejustify, char colborder,
  1268.                                     char coltitle, char colnorm, char
  1269.                                     *buffer);
  1270.   
  1271.   Prototype in        video.h
  1272.   
  1273.   Remarks             draws a 'window'-like box (similiar to box(), but
  1274.                       with a title) at the coordinates (left,top) to
  1275.                       (right,bottom). The characters in frame[] are used
  1276.                       to generate the frame, with frame[9] and frame[10] 
  1277.                       used as pre-/post-title separators if a title is
  1278.                       specified (title justification is not NONE). The
  1279.                       title is aligned as per titlejustify (LEFT, CENTER,
  1280.                       RIGHT or NONE. See HOWARD.H for more details). The
  1281.                       frame uses the colborder attribute, the title, if
  1282.                       any, uses the coltitle attribute and the inner
  1283.                       portions of the box are filled with spaces of
  1284.                       colnorm color. The box is stored in the memory
  1285.                       allocated by buffer and displayed with puttext().
  1286.   
  1287.                       If a title is specified (title justification is not
  1288.                       NONE) the title is separated from the pre-/post-
  1289.                       -title separators by a space.
  1290.   
  1291.                       Sufficient memory must be allocated for buffer to
  1292.                       contain the entire box, with attributes (see
  1293.                       scrbuff()).
  1294.   
  1295.                       Upon completion, buffer contains a copy of the
  1296.                       screen image of the box displayed (usable by
  1297.                       puttext()).
  1298.   
  1299.                       This routine is taken from an older version of the
  1300.                       popup...() and litebar...() creation functions.
  1301.                       This function does virtually no error checking.
  1302.   
  1303.   Return value        returns zero upon succesful completion, -1 if an
  1304.                       error occurs.
  1305.   
  1306.   See also            global variables
  1307.                       box(), horiz_line(), litebar...(), popup...(),
  1308.                       vert_line()
  1309.   
  1310.   
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.      TCHK 2.1                                                    Page 21
  1327.  
  1328.   Example             #include <video.h>
  1329.                       #include <howard.h>      /* for CENTER */
  1330.                       #include <color.h>       /* for colors */
  1331.   
  1332.                       main()
  1333.                       {
  1334.                            char vidbuff[scrbuff(1,1,15,4)],
  1335.                                 framebox[] = "abcdefgh[]";
  1336.   
  1337.                            boxwindow(1,1,15,4,framebox,"Title",CENTER,
  1338.                                      CYAN,YELLOW,RED,vidbuff);
  1339.                       }
  1340.   
  1341.   Program output      abb[ Title ]bbc
  1342.                       h             d
  1343.                       h             d
  1344.                       gfffffffffffffe
  1345.   
  1346.   
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.      TCHK 2.1                                                    Page 22
  1393.  
  1394.   
  1395.   Function             Cal... - family of Calendar date conversions
  1396.   
  1397.   Syntax              char *CaltoGreg(double cal);
  1398.                       char *CaltoGregEuro(double cal);
  1399.                       char *CaltoGregJap(double cal);
  1400.                       double CaltoJul(double cal);
  1401.                       double CaltoJulA(double cal);
  1402.                       double CaltoJulB(double cal);
  1403.                       double CaltoCalCent(double cal);
  1404.                       double CalCenttoCal(double cal);
  1405.   
  1406.   Prototype in        datehk.h
  1407.   
  1408.   Remarks             CaltoGreg      converts Calendar date to Gregorian
  1409.                                      (US) date
  1410.                       CaltoGregEuro  converts Calendar date to Gregorian
  1411.                                      (European) date
  1412.                       CaltoGregJap   converts Calendar date to Gregorian
  1413.                                      (Japan) date
  1414.                       CaltoJul       converts Calendar date to Julian
  1415.                                      (Type E) date
  1416.                       CaltoJulA      converts Calendar date to Julian
  1417.                                      (Type A) date
  1418.                       CaltoJulB      converts Calendar date to Julian
  1419.                                      (Type B) date
  1420.                       CaltoCalCent   converts Calendar date to Calendar
  1421.                                      date (w/century)
  1422.                       CalCenttoCal   converts Calendar date (w/century)
  1423.                                      to Calendar date
  1424.   
  1425.   Return value        CaltoGreg... return the appropriate Gregorian date
  1426.                       CaltoJul... return the appropriate Julian date
  1427.                       CaltoCalCent returns a Calendar date (w/century)
  1428.                       CalCentotCal returns a Calendar date
  1429.   
  1430.   See also            Appendix A
  1431.                       date_convert(), ddatetofull(), ddatetoshort(),
  1432.                       ddatetostr(), fulltoddate(), Greg...(), Jul...(),
  1433.                       monthexpand(), shorttoddate(), strtoddate()
  1434.   
  1435.   Example             see demodate.c
  1436.   
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.      TCHK 2.1                                                    Page 23
  1459.  
  1460.   
  1461.   Function             CapsLock - set the Caps Lock key state
  1462.   
  1463.   Syntax              void InsLock(boolean on);
  1464.   
  1465.   Prototype in        ibm.h
  1466.   
  1467.   Remarks             sets the Caps Lock key state to the state selected
  1468.                       by the on parameter.
  1469.   
  1470.   Return value        nothing.
  1471.   
  1472.   See also            InsLock(), NumLock(), ScrollLock()
  1473.   
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.      TCHK 2.1                                                    Page 24
  1525.  
  1526.   
  1527.   Function             CEDadd - add a CED installable command
  1528.   
  1529.   Syntax              boolean CEDadd(char *command, unsigned char mode,
  1530.                                      unsigned segment, unsigned offset);
  1531.   
  1532.   Prototype in        doshk.h
  1533.   
  1534.   Remarks             adds a CED installable command. The mode parameter
  1535.                       is a bit mask with the following settings:
  1536.   
  1537.                            bit 0 = 1      callable from DOS prompt
  1538.                            bit 1 = 1      callable from application
  1539.   
  1540.                       command should be terminated by a CR.
  1541.   
  1542.                       The segment:offset parameters point to a FAR
  1543.                       routine entry point.
  1544.   
  1545.   Return value        returns TRUE if successful, FALSE otherwise. If
  1546.                       unsuccessful, _doserrno will contain the error
  1547.                       code:
  1548.   
  1549.                            0x01      invalid function
  1550.                            0x08      insufficient memory
  1551.                            0x0E      bad data
  1552.   
  1553.                       If CED is not installed, _doserrno & 0xFF00 will
  1554.                       return 0xFF00.
  1555.   
  1556.   See also            CEDremove(), isCEDavail()
  1557.   
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.      TCHK 2.1                                                    Page 25
  1591.  
  1592.   
  1593.   Function             CEDremove - remove a CED installable command
  1594.   
  1595.   Syntax              boolean CEDremove(char *command);
  1596.   
  1597.   Prototype in        doshk.h
  1598.   
  1599.   Remarks             remove a CED installable command. The command
  1600.                       parameter should be terminated by a CR.
  1601.   
  1602.   Return value        returns TRUE if successful, FALSE otherwise. If
  1603.                       unsuccessful, _doserrno will contain the error
  1604.                       code:
  1605.   
  1606.                            0x01      invalid function
  1607.                            0x02      command not found
  1608.   
  1609.                       If CED is not installed, _doserrno & 0xFF00 will
  1610.                       return 0xFF00.
  1611.   
  1612.   See also            CEDadd(), isCEDavail()
  1613.   
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.      TCHK 2.1                                                    Page 26
  1657.  
  1658.   
  1659.   Function             center - coordinate to center a message on screen
  1660.   
  1661.   Syntax              int center(char *str);
  1662.   
  1663.   Prototype in        video.h
  1664.   
  1665.   Remarks             center() will determine the proper X-coordinate to
  1666.                       display str centered horizontally with the current
  1667.                       window area. See Borland's explanation of window()
  1668.                       and related topics for further details.
  1669.   
  1670.   Return value        returns X coordinate to display str centered
  1671.                       horizontally within the window() corrdinates.
  1672.   
  1673.   Example             #include <video.h>
  1674.   
  1675.                       main()
  1676.                       {
  1677.                            char msg[] = "This will be centered on line 3"
  1678.   
  1679.                            gotoxy(center(msg),3);
  1680.                            cputs(msg);
  1681.                       }
  1682.   
  1683.   Program output      
  1684.   
  1685.                                           This will be centered on line 3
  1686.   
  1687.   
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.      TCHK 2.1                                                    Page 27
  1723.  
  1724.   
  1725.   Function             changelitebar - set internal litebar menu 
  1726.                                            information
  1727.   
  1728.   Syntax              void changelitebar(struct litebar_header *lh,
  1729.                                          struct litebar_field *lf)
  1730.   
  1731.   Prototype in        menuhk.h
  1732.   
  1733.   Remarks             sets internal variables for a litebar menu
  1734.                       regarding the currently hilited item.
  1735.   
  1736.                       This function is used internally by several
  1737.                       litebar...() menu functions.
  1738.   
  1739.   Return value        nothing.
  1740.   
  1741.   Note                This function is for internal uses only.
  1742.   
  1743.   See also            menuhk.h
  1744.                       isHiliteable(), litebar_alloc(), litebar_free(),
  1745.                       litebar_get(), litehilite(), litemessage(),
  1746.                       liteunhilite(), menu_litebar()
  1747.                       litebarerrno
  1748.   
  1749.   
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.      TCHK 2.1                                                    Page 28
  1789.  
  1790.   
  1791.   Function             Checksum_block - calculate checksum for a block
  1792.   
  1793.   Syntax              unsigned char Checksum_block(char *b, int size);
  1794.   
  1795.   Prototype in        comm.h
  1796.   
  1797.   Remarks             calculates a checksum value based on the block
  1798.                       given. A checksum value is commonly used by older
  1799.                       transmission protocols such as Xmodem.
  1800.   
  1801.   Return value        returns a checksum value for the block operated on.
  1802.   
  1803.   See also            CRC16_block(), CRC16tupdate(), CRC16update(),
  1804.                       CRC32tupdate()
  1805.   
  1806.   
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.      TCHK 2.1                                                    Page 29
  1855.  
  1856.   
  1857.   Function             clear - clears a portion of the screen
  1858.   
  1859.   Syntax              void clear(int left, int top, int right,
  1860.                                  int bottom);
  1861.   
  1862.   Prototype in        video.h
  1863.   
  1864.   Remarks             clears a box of the screen via gotohv() and putk().
  1865.                       All screen coordinates are absolute.
  1866.   
  1867.   Return value        nothing.
  1868.   
  1869.   See also            cls(), gotohv(), putk()
  1870.   
  1871.   Example             #include <video.h>
  1872.   
  1873.                       main()
  1874.                       {
  1875.                            clear(0,0,79,3);    /* clear top 4 lines */
  1876.                       }
  1877.   
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.      TCHK 2.1                                                    Page 30
  1921.  
  1922.   
  1923.   Function             clear_typeahead - clear typeahead buffer
  1924.   
  1925.   Syntax              int clear_typeahead(void);
  1926.   
  1927.   Prototype in        keyboard.h
  1928.   
  1929.   Remarks             clears the typeahead buffer and returns the number
  1930.                       of keystrokes cleared
  1931.   
  1932.   Return value        number of keystrokes emptied from the typeahead
  1933.                       buffer
  1934.   
  1935.   Example             #include <keyboard.h>
  1936.                       #include <stdio.h>
  1937.   
  1938.                       main()
  1939.                       {
  1940.                            printf("# keystrokes emptied = %d",
  1941.                                   clear_typeahead());
  1942.                       }
  1943.   
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.      TCHK 2.1                                                    Page 31
  1987.  
  1988.   
  1989.   Function             cls - clear screen
  1990.   
  1991.   Syntax              #include <video.h>
  1992.                       cls();
  1993.   
  1994.   Prototype in        video.h
  1995.   
  1996.   Remarks             clears screen by Borland's clrscr(). I hated their
  1997.                       name for it, so I #defined cls().
  1998.   
  1999.   Return value        nothing.
  2000.   
  2001.   See also            clear()
  2002.   
  2003.   Example             #include <video.h>
  2004.   
  2005.                       main()
  2006.                       {
  2007.                            cls()
  2008.                       }
  2009.   
  2010.   
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.      TCHK 2.1                                                    Page 32
  2053.  
  2054.   
  2055.   Function             color - make a single attribute
  2056.   
  2057.   Syntax              #include <video.h>
  2058.                       color(f,b)
  2059.   
  2060.   Prototype in        video.h
  2061.   
  2062.   Remarks             converts a color for a foreground and background
  2063.                       attribute in foreground format (0-15) to a single
  2064.                       byte.
  2065.   
  2066.                       This function is a macro.
  2067.   
  2068.   Return value        returns an attribute byte of foreground ORed with
  2069.                       the background shifted left 4 bits.
  2070.   
  2071.   
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.      TCHK 2.1                                                    Page 33
  2119.  
  2120.   
  2121.   Function             commit - flush disk buffers for to a handle
  2122.   
  2123.   Syntax              boolean commit(int handle);
  2124.   
  2125.   Prototype in        doshk.h
  2126.   
  2127.   Remarks             commit will flush all disk buffers associated with
  2128.                       a handle. If DOS 3.3 or later is active, DOS
  2129.                       Function 0x68 is used. Under pre-DOS 3.3 versions,
  2130.                       the handle is duplicated (DOS Function 0x45) and
  2131.                       subsequently closed (DOS Function 0x3E), flushing
  2132.                       all buffers for that handle.
  2133.   
  2134.   Return value        returns TRUE is successful, FALSE otherwise.
  2135.   
  2136.   
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.      TCHK 2.1                                                    Page 34
  2185.  
  2186.   
  2187.   Function             Compaq386GetCpuSpeed - get cpu speed on a
  2188.                                                Compaq 386
  2189.   
  2190.   Syntax              unsigned char Compaq386GetCpuSpeed(unsigned int
  2191.                                                            *speedvalue);
  2192.   
  2193.   Prototype in        ibm.h
  2194.   
  2195.   Remarks             determines the cpu speed of a Compaq 386 computer.
  2196.                       The speed is returned and, if type/category 0x09
  2197.                       (dynamic) the parameter speedvalue will point to
  2198.                       the direct speed value.
  2199.   
  2200.   Return value        returns the cpu speed type/category. See
  2201.                       Compaq386SetCpuSpeed() for the list of
  2202.                       types/categories.
  2203.   
  2204.   Note                This function should ONLY be used on Compaq 386
  2205.                       computers or unpredictable results may occur.
  2206.   
  2207.   See also            Compaq386KbdType(), Compaq386SetCpuSpeed()
  2208.   
  2209.   Example             #include <ibm.h>
  2210.   
  2211.                       main()
  2212.                       {
  2213.                            unsigned char speed;
  2214.                            unsigned int directvalue;
  2215.   
  2216.                            speed = Compaq386GetCpuSpeed(&directvalue);
  2217.                            printf("cpu speed = %u\n",speed);
  2218.                            if (directvalue == 0x09)
  2219.                                 printf("direct value = %u\n",
  2220.                                        directvalue);
  2221.                       }
  2222.   
  2223.   
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.      TCHK 2.1                                                    Page 35
  2251.  
  2252.   
  2253.   Function             Compaq386KbdType - keyboard type used by a
  2254.                                            Compaq 386
  2255.   
  2256.   Syntax              unsigned char Compaq386KbdType(void);
  2257.   
  2258.   Prototype in        ibm.h
  2259.   
  2260.   Remarks             determines the type of keyboard in use by a Compaq
  2261.                       386 computer.
  2262.   
  2263.   Return value        returns 0 if the keyboard in use is an 11-bit AT
  2264.                       type keyboard and 1 if the keyboard is a 9-bit PC
  2265.                       type keyboard.
  2266.   
  2267.   Note                This function should ONLY be used on Compaq 386
  2268.                       computers or unpredictable results may occur.
  2269.   
  2270.   See also            Compaq386GetCpuSpeed(), Compaq386SetCpuSpeed()
  2271.   
  2272.   Example             #include <ibm.h>
  2273.   
  2274.                       main()
  2275.                       {
  2276.   
  2277.                            printf("Keyboard in use: );
  2278.                            switch (Compaq386KbdType()) {
  2279.                                 case 0: printf("11-bit AT style\n");
  2280.                                 case 1: printf("9-bit PC style\n");
  2281.                                 default: printf("unknown\n");
  2282.                            }
  2283.                       }
  2284.   
  2285.   
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.      TCHK 2.1                                                    Page 36
  2317.  
  2318.   
  2319.   Function             Compaq386SetCpuSpeed - set cpu speed on a
  2320.                                                Compaq 386
  2321.   
  2322.   Syntax              void Compaq386SetCpuSpeed(unsigned char speed,
  2323.                                                 unsigned int speedvalue);
  2324.   
  2325.   Prototype in        ibm.h
  2326.   
  2327.   Remarks             sets the cpu speed of a Compaq 386 computer, based
  2328.                       on the following chart:
  2329.   
  2330.                            speed:  0 - equivalent to 6 MHz 80286 (COMMON)
  2331.                                    1 - equivalent to 8 MHz 80286 (FAST)
  2332.                                    2 - full 16 MHz (HIGH)
  2333.                                    3 -  toggles between 8 MHz-equivalent
  2334.                                         and speed set by system board
  2335.                                         switch (AUTO or HIGH)
  2336.                                    8 -  full 16 MHz except 8 MHz-
  2337.                                         -equivalent during floppy disk
  2338.                                         access
  2339.                                    9 -  specify speed directly (via
  2340.                                         speedvalue parameter, from 1
  2341.                                         (slowest) to 50 (full), 3 ~= 8088
  2342.                                         running at 4.77 MHz)
  2343.   
  2344.   Return value        nothing.
  2345.   
  2346.   Note                This function should ONLY be used on Compaq 386
  2347.                       computers or unpredictable results may occur.
  2348.   
  2349.   See also            Compaq386GetCpuSpeed(), Compaq386KbdType()
  2350.   
  2351.   
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.      TCHK 2.1                                                    Page 37
  2383.  
  2384.   
  2385.   Function             CompaqExternalMonitorType - Get external monitor
  2386.                                                     type
  2387.   
  2388.   Syntax              unsigned char CompaqExternalMonitorType(void);
  2389.   
  2390.   Prototype in        video.h
  2391.   
  2392.   Remarks             determines the external monitor type on a Compaq
  2393.                       Portable.
  2394.   
  2395.   Return value        returns the external monitor type as follows:
  2396.   
  2397.                            0x00 - none
  2398.                            0x01 - dual-mode monitor
  2399.                            0x02 - 5153 RGB monitor
  2400.                            0x03 - Compaq Color monitor
  2401.                            0x04 - 640x400 flat panel
  2402.   
  2403.   Note                This function should ONLY be used on a Compaq
  2404.                       Portable or unpredictable results may occur.
  2405.   
  2406.   See also            CompaqGetMonitor(), CompaqGetMasterMode(),
  2407.                       CompaqInternalMonitorType(),
  2408.                       CompaqModeSwitchDelay(), CompaqSelectMonitor(),
  2409.                       CompaqSetMasterMode()
  2410.   
  2411.   
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.      TCHK 2.1                                                    Page 38
  2449.  
  2450.   
  2451.   Function             CompaqGetMasterMode - Get master mode of current
  2452.                                               controller
  2453.   
  2454.   Syntax              unsigned char CompaqGetMasterMode(void);
  2455.   
  2456.   Prototype in        video.h
  2457.   
  2458.   Remarks             CompaqGetMasterMode() gets the master mode of the
  2459.                       current controller on a Compaq Portable.
  2460.   
  2461.   Return value        returns the master mode of the current controller
  2462.                       as follows:
  2463.   
  2464.                            0x00 - switchable VDU not present
  2465.                            0x04 - CGA
  2466.                            0x05 - EGA
  2467.                            0x07 - MDA
  2468.   
  2469.   Note                This function should ONLY be used on a Compaq
  2470.                       Portable or unpredictable results may occur.
  2471.   
  2472.   See also            CompaqExternalMonitorType(), CompaqGetMonitor(), 
  2473.                       CompaqInternalMonitorType(),
  2474.                       CompaqModeSwitchDelay(), CompaqSelectMonitor(),
  2475.                       CompaqSetMasterMode()
  2476.   
  2477.   
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.      TCHK 2.1                                                    Page 39
  2515.  
  2516.   
  2517.   Function             CompaqGetMonitor - Get active monitor
  2518.   
  2519.   Syntax              unsigned char CompaqGetMonitor(void);
  2520.   
  2521.   Prototype in        video.h
  2522.   
  2523.   Remarks             CompaqGetMonitor() determines the active monitor on
  2524.                       a Compaq Portable.
  2525.   
  2526.   Return value        returns 0 if the external monitor is active and 1
  2527.                       if the internal monitor is active.
  2528.   
  2529.   Note                This function should ONLY be used on a Compaq
  2530.                       Portable or unpredictable results may occur.
  2531.   
  2532.   See also            CompaqExternalMonitorType(), CompaqGetMasterMode(),
  2533.                       CompaqInternalMonitorType(),
  2534.                       CompaqModeSwitchDelay(), CompaqSelectMonitor(),
  2535.                       CompaqSetMasterMode()
  2536.   
  2537.   
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.      TCHK 2.1                                                    Page 40
  2581.  
  2582.   
  2583.   Function             CompaqInternalMonitorType - Get internal monitor
  2584.                                                     type
  2585.   
  2586.   Syntax              unsigned char CompaqInternalMonitorType(void);
  2587.   
  2588.   Prototype in        video.h
  2589.   
  2590.   Remarks             determines the internal monitor type on a Compaq
  2591.                       Portable.
  2592.   
  2593.   Return value        returns the internal monitor type as follows:
  2594.   
  2595.                            0x00 - none
  2596.                            0x01 - dual-mode monitor
  2597.                            0x02 - 5153 RGB monitor
  2598.                            0x03 - Compaq Color monitor
  2599.                            0x04 - 640x400 flat panel
  2600.   
  2601.   Note                This function should ONLY be used on a Compaq
  2602.                       Portable or unpredictable results may occur.
  2603.   
  2604.   See also            CompaqExternalMonitorType(), CompaqGetMonitor(),
  2605.                       CompaqGetMasterMode(), CompaqModeSwitchDelay(),
  2606.                       CompaqSelectMonitor(), CompaqSetMasterMode()
  2607.   
  2608.   
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.      TCHK 2.1                                                    Page 41
  2647.  
  2648.   
  2649.   Function             CompaqModeSwitchDelay - Set mode switch delay
  2650.   
  2651.   Syntax              void CompaqModeSwitchDelay(boolean enable);
  2652.   
  2653.   Prototype in        video.h
  2654.   
  2655.   Remarks             CompaqModeSwitchDelay() sets the mode switch delay
  2656.                       on a Compaq Portable, based on the value of the
  2657.                       parameter enable.
  2658.   
  2659.   Return value        nothing.
  2660.   
  2661.   Note                This function should ONLY be used on a Compaq
  2662.                       Portable or unpredictable results may occur.
  2663.   
  2664.   See also            CompaqExternalMonitorType(), CompaqGetMasterMode(),
  2665.                       CompaqGetMonitor(),  CompaqInternalMonitorType(),
  2666.                       CompaqSelectMonitor(), CompaqSetMasterMode()
  2667.   
  2668.   
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.      TCHK 2.1                                                    Page 42
  2713.  
  2714.   
  2715.   Function             CompaqSelectMonitor - Select active monitor
  2716.   
  2717.   Syntax              void CompaqSelectMonitor(boolean internal);
  2718.   
  2719.   Prototype in        video.h
  2720.   
  2721.   Remarks             CompaqSelectMonitor() sets the active monitor on a
  2722.                       Compaq Portable to be the internal or external
  2723.                       monitor, based on the value of the parameter
  2724.                       internal.
  2725.   
  2726.   Return value        nothing.
  2727.   
  2728.   Note                This function should ONLY be used on a Compaq
  2729.                       Portable or unpredictable results may occur.
  2730.   
  2731.   See also            CompaqExternalMonitorType(), CompaqGetMonitor(), 
  2732.                       CompaqGetMasterMode(), CompaqInternalMonitorType(),
  2733.                       CompaqModeSwitchDelay(), CompaqSetMasterMode()
  2734.   
  2735.   
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.      TCHK 2.1                                                    Page 43
  2779.  
  2780.   
  2781.   Function             CompaqSetMasterMode - Set master mode of current
  2782.                                               controller
  2783.   
  2784.   Syntax              void CompaqSetMasterMode(unsigned char mastermode);
  2785.   
  2786.   Prototype in        video.h
  2787.   
  2788.   Remarks             CompaqSetMasterMode() sets the master mode of the
  2789.                       current controller on a Compaq Portable, based on
  2790.                       the value of the parameter mastermode:
  2791.   
  2792.                            0x04 - CGA
  2793.                            0x05 - EGA
  2794.                            0x07 - MDA
  2795.   
  2796.   Return value        nothing.
  2797.   
  2798.   Note                This function should ONLY be used on a Compaq
  2799.                       Portable or unpredictable results may occur.
  2800.   
  2801.   See also            CompaqExternalMonitorType(), CompaqGetMonitor(), 
  2802.                       CompaqGetMasterMode(), CompaqInternalMonitorType(),
  2803.                       CompaqModeSwitchDelay(), CompaqSelectMonitor()
  2804.   
  2805.   
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.      TCHK 2.1                                                    Page 44
  2845.  
  2846.   
  2847.   Function             cpu_id - identify the cpu
  2848.   
  2849.   Syntax              int cpu_id(void);
  2850.   
  2851.   Prototype in        chiphk.h
  2852.   
  2853.   Remarks             cpu_id does some opcode magic to identify the cpu.
  2854.                       Currently identified chips are the 8088/8086,
  2855.                       80286, 80386 and the NEV V20/V30.
  2856.   
  2857.   Return value        returns a value identifying the cpu. See chiphk.h
  2858.                       for further details.
  2859.   
  2860.   Note                Other (not 88/86, 286, 386 or V20/V30) chips will
  2861.                       not be identified correctly, and will probably be
  2862.                       interpreted as an NEC cpu.
  2863.   
  2864.   See also            machine_id(), ndp_id()
  2865.   
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.      TCHK 2.1                                                    Page 45
  2911.  
  2912.   
  2913.   Function             CRC16_block - calculate CRC-16 for a block
  2914.   
  2915.   Syntax              unsigned CRC16_block(char *b, int size);
  2916.   
  2917.   Prototype in        comm.h
  2918.   
  2919.   Remarks             calculates a CRC-16 value based on the polynomial
  2920.                       X^16 + X^15 + X^2 + 1. The CRC-16 value is commonly
  2921.                       used by transmission protocols such as Xmodem and
  2922.                       Ymodem.
  2923.   
  2924.                       CRC16_block() will calculate the CRC-16 value for a
  2925.                       given block of bytes.
  2926.   
  2927.   Return value        returns a CRC-16 value for the block operated on.
  2928.   
  2929.   Note                There are two common flavors of 16 bit CRCs, the
  2930.                       CRC-16 used by transmission protocols and a
  2931.                       CRC-CCIT based on a different polynomial. The two
  2932.                       are NOT compatible. I believe the CRC used in .ARC
  2933.                       files is of the CRC-16 variety, but will not swear
  2934.                       by it until I have verification. The CRC-16 value
  2935.                       calculated by TCHK is in proper bit order for use
  2936.                       in transfer protocols.
  2937.   
  2938.   See also            Checksum_block(), CRC16tupdate(), CRC16update(),
  2939.                       CRC32tupdate()
  2940.   
  2941.   
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.      TCHK 2.1                                                    Page 46
  2977.  
  2978.   
  2979.   Function             CRC16tupdate - update a CRC-16 value via tables
  2980.   
  2981.   Syntax              unsigned CRC16tupdate(char c, unsigned crc);
  2982.   
  2983.   Prototype in        comm.h
  2984.   
  2985.   Remarks             updates a CRC-16 value based on the polynomial
  2986.                       X^16 + X^15 + X^2 + 1 given c and the original crc
  2987.                       value. The CRC-16 value is commonly used by
  2988.                       transmission protocols such as Xmodem and Ymodem.
  2989.   
  2990.                       This function is table driven.
  2991.   
  2992.   Return value        returns an updated CRC-16 value.
  2993.   
  2994.   Note                There are two common flavors of 16 bit CRCs, the
  2995.                       CRC-16 used by transmission protocols and a
  2996.                       CRC-CCIT based on a different polynomial. The two
  2997.                       are NOT compatible. I believe the CRC used in .ARC
  2998.                       files is of the CRC-16 variety, but will not swear
  2999.                       by it until I have verification. The CRC-16 value
  3000.                       calculated by TCHK is in proper bit order for use
  3001.                       in transfer protocols.
  3002.   
  3003.   See also            Checksum_block(), CRC16_block(), CRC16update(),
  3004.                       CRC32tupdate()
  3005.   
  3006.   
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.      TCHK 2.1                                                    Page 47
  3043.  
  3044.   
  3045.   Function             CRC16update - update a CRC-16 value
  3046.   
  3047.   Syntax              unsigned CRC16update(char c, unsigned crc);
  3048.   
  3049.   Prototype in        comm.h
  3050.   
  3051.   Remarks             updates a CRC-16 value based on the polynomial
  3052.                       X^16 + X^15 + X^2 + 1 given c and the original crc
  3053.                       value. The CRC-16 value is commonly used by
  3054.                       transmission protocols such as Xmodem and Ymodem.
  3055.   
  3056.                       This function does all calculations on the fly.
  3057.   
  3058.   Return value        returns an updated CRC-16 value.
  3059.   
  3060.   Note                There are two common flavors of 16 bit CRCs, the
  3061.                       CRC-16 used by transmission protocols and a
  3062.                       CRC-CCIT based on a different polynomial. The two
  3063.                       are NOT compatible. I believe the CRC used in .ARC
  3064.                       files is of the CRC-16 variety, but will not swear
  3065.                       by it until I have verification. The CRC-16 value
  3066.                       calculated by TCHK is in proper bit order for use
  3067.                       in transfer protocols.
  3068.   
  3069.   See also            Checksum_block(), CRC16_block(), CRC16tupdate(),
  3070.                       CRC32tupdate()
  3071.   
  3072.   
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.      TCHK 2.1                                                    Page 48
  3109.  
  3110.   
  3111.   Function             CRC32tupdate - update a CRC-32 value via tables
  3112.   
  3113.   Syntax              unsigned long CRC32tupdate(char c,
  3114.                                                  unsigned long crc);
  3115.   
  3116.   Prototype in        comm.h
  3117.   
  3118.   Remarks             updates a CRC-32 value based on the polynomial
  3119.                       X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 +
  3120.                       X^10 + X^8 + X^7 + X^5 + X^4 + X^2 + X^1 + X^0
  3121.                       given c and the original crc value. This CRC-32
  3122.                       value is commonly used by the transmission protocol
  3123.                       Zmodem.
  3124.   
  3125.                       This function is table driven.
  3126.   
  3127.                       Before the first call to this function, be sure to
  3128.                       initialize crc to 0xFFFFFFFF.
  3129.   
  3130.   Return value        returns an updated CRC-32 value.
  3131.   
  3132.   Note                This function is designed for data communications
  3133.                       and returns the crc bytes in LOW to HIGH order, NOT
  3134.                       byte reversed! To turn the value into a 'normal'
  3135.                       unsigned long, you must reverse the bytes! Here is
  3136.                       a code fragment to reverse the bytes:
  3137.   
  3138.                            int i;
  3139.                            unsigned long normal;
  3140.   
  3141.                            /* get crc value */
  3142.   
  3143.                            for (normal=0lu, i=0; i<4; i++) {
  3144.                                 normal << 8;
  3145.                                 normal |= (crc & 0x000000FF)
  3146.                                 crc >>= 8;
  3147.                            }
  3148.   
  3149.                       ZIP files, designed by Phil Katz, use a CRC-32,
  3150.                       although I believe the CRC-32 used is 'normalized'
  3151.                       and not byte reversed as returned by this function.
  3152.   
  3153.   See also            Checksum_block(), CRC16_block(), CRC16update(), 
  3154.                       CRC16tupdate()
  3155.   
  3156.   
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.      TCHK 2.1                                                    Page 49
  3175.  
  3176.   
  3177.   Function             cursor_blink - set speed of cursor blink
  3178.   
  3179.   Syntax              void cursor_blink(boolean fast);
  3180.   
  3181.   Prototype in        video.h
  3182.   
  3183.   Remarks             this function will make the cursor blink fast if
  3184.                       fast is TRUE, or slow if fast is FALSE.
  3185.   
  3186.   Return value        nothing.
  3187.   
  3188.   See also            cursor_flip(), cursor_off(), cursor_on(),
  3189.                       getcursor(), getcursor(), read_cursor(),
  3190.                       set_cursor(), setcursor()
  3191.   
  3192.   
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.      TCHK 2.1                                                    Page 50
  3241.  
  3242.   
  3243.   Function             cursor_flip - toggle the cursor type
  3244.   
  3245.   Syntax              void cursor_flip(unsigned int curs1,
  3246.                                        unsigned int curs2);
  3247.   
  3248.   Prototype in        video.h
  3249.   
  3250.   Remarks             toggles the cursor scan lines to whichever set the
  3251.                       cursor is not currently set for.
  3252.   
  3253.   Return value        nothing.
  3254.   
  3255.   See also            cursor_blink(), cursor_off(), cursor_on(),
  3256.                       getcursor(), read_cursor(), set_cursor(),
  3257.                       setcursor()
  3258.   
  3259.   Example             #include <video.h>
  3260.   
  3261.                       main()
  3262.                       {
  3263.                            cursor_flip(CURSOR_UNDERBAR,CURSOR_HALFBLOCK);
  3264.                       }
  3265.   
  3266.   
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.      TCHK 2.1                                                    Page 51
  3307.  
  3308.   
  3309.   Function             cursor_off - turn the cursor off
  3310.   
  3311.   Syntax              void cursor_off(void);
  3312.   
  3313.   Prototype in        video.h
  3314.   
  3315.   Remarks             makes the cursor invisible.
  3316.   
  3317.   Return value        nothing.
  3318.   
  3319.   See also            cursor_blink(), cursor_flip(), cursor_on(),
  3320.                       getcursor(), read_cursor(), set_cursor(),
  3321.                       setcursor()
  3322.   
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.      TCHK 2.1                                                    Page 52
  3373.  
  3374.   
  3375.   Function             cursor_on - turn the cursor on
  3376.   
  3377.   Syntax              void cursor_on(void);
  3378.   
  3379.   Prototype in        video.h
  3380.   
  3381.   Remarks             makes the cursor visible.
  3382.   
  3383.   Return value        nothing.
  3384.   
  3385.   See also            cursor_blink(), cursor_flip(), cursor_off(),
  3386.                       getcursor(), read_cursor(), set_cursor(),
  3387.                       setcursor()
  3388.   
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.      TCHK 2.1                                                    Page 53
  3439.  
  3440.   
  3441.   Function             date_convert - convert date formats
  3442.   
  3443.   Syntax              boolean date_convert(void *source, void *dest,
  3444.                                            int stype, int dtype);
  3445.   
  3446.   Prototype in        dateadv.h
  3447.   
  3448.   Remarks             date_convert will convert a date from virtually any
  3449.                       date format to any other. The parameters *source
  3450.                       and *dest must be pointers pointing to a piece of
  3451.                       memory allocated as the proper data type. stype and
  3452.                       dtype determine the format of source and dest.
  3453.   
  3454.                       Due to the great number of formats supported, a
  3455.                       chart of valid date formats is provided in Appendix
  3456.                       B.
  3457.   
  3458.                       Limited error checking is done on passed data. If
  3459.                       an invalid date format is passed, unpredictable
  3460.                       results will occur.
  3461.   
  3462.   Return value        returns TRUE is the conversion was successful and
  3463.                       FALSE if the date could not be converted.
  3464.   
  3465.   Note                This function does NO function calls except for
  3466.                       isleapyear(). I've tried to optimize this function
  3467.                       as much as possible for speed, not size. If you
  3468.                       only need to convert between, say, Calendar and
  3469.                       Julian dates, you may be better off using the
  3470.                       functions listed in datehk.h.
  3471.   
  3472.   See also            Appendix A, B
  3473.                       Cal...(), ddatetofull(), ddatetoshort(),
  3474.                       ddatetostr(), fulltoddate(), Greg...(), Jul...(),
  3475.                       monthexpand(), shorttoddate(), strtoddate()
  3476.   
  3477.   Example             see demoadv.c
  3478.   
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.      TCHK 2.1                                                    Page 54
  3505.  
  3506.   
  3507.   Function             dayofweek - find the day of the week
  3508.   
  3509.   Syntax              int dayofweek(double jul);
  3510.   
  3511.   Prototype in        datehk.h
  3512.   
  3513.   Remarks             finds the day of the week for a given Julian
  3514.                       (Type E) date
  3515.   
  3516.   Return value        returns 0-6 (Sun...Sat)
  3517.   
  3518.   See also            Appendix A
  3519.                       datehk.h
  3520.   
  3521.   Example             see demodate.c
  3522.   
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.      TCHK 2.1                                                    Page 55
  3571.  
  3572.   
  3573.   Function             dayofyear - calculate the day of the year
  3574.   
  3575.   Syntax              int dayofyear(struct ddate *d);
  3576.   
  3577.   Prototype in        datehk.h
  3578.   
  3579.   Remarks             dayofyear calculate the day of the year given a
  3580.                       date. The day of the year will range from 1
  3581.                       (January 1) to 365 (Dec 31, no leap year) or 366
  3582.                       (Dec 31, leap year.)
  3583.   
  3584.                       dayofyear does no error checking on passed
  3585.                       parameters.
  3586.   
  3587.   Return value        returns a number from 1 to 365 (no leap year) or
  3588.                       366 (leap year.)
  3589.   
  3590.   See also            dayofweek(), daysleft(), diffddate()
  3591.   
  3592.   Example             #include <datehk.h>
  3593.   
  3594.                       main()
  3595.                       {
  3596.                            struct ddate today;
  3597.   
  3598.                            /* set today to Feb 3, 1987 */
  3599.                            printf("%d/%d = day %d\n", today.dmon,
  3600.                                 today.dday, dayofyear(&today));
  3601.                       }
  3602.   
  3603.   Program output      2/3 = day 34
  3604.   
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.      TCHK 2.1                                                    Page 56
  3637.  
  3638.   
  3639.   Function             daysleft - calculate the days left in the year
  3640.   
  3641.   Syntax              int daysleft(struct ddate *d);
  3642.   
  3643.   Prototype in        datehk.h
  3644.   
  3645.   Remarks             daysleft calculates how many more days are left in
  3646.                       the year. The days left will range from 0 (Dec 31)
  3647.                       to 364 (Jan 1, no leap year) or 365 (Jan 1, leap
  3648.                       year.)
  3649.   
  3650.                       daysleft does no error checking on passed
  3651.                       parameters.
  3652.   
  3653.   Return value        returns a number from 0 to 364 (no leap year) or
  3654.                       365 (leap year.)
  3655.   
  3656.   See also            dayofyear(), diffddate()
  3657.   
  3658.   Example             #include <datehk.h>
  3659.   
  3660.                       main()
  3661.                       {
  3662.                            struct ddate today;
  3663.   
  3664.                            /* set today to Nov 3, 1987 */
  3665.                            printf("%d/%d = %d days left\n", today.dmon,
  3666.                                 today.dday, daysleft(&today));
  3667.                       }
  3668.   
  3669.   Program output      11/3 = 58 days left
  3670.   
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.      TCHK 2.1                                                    Page 57
  3703.  
  3704.   
  3705.   Function             ddatetofull - convert a date to full string
  3706.   
  3707.   Syntax              char *ddatetofull(struct ddate *source); 
  3708.   
  3709.   Prototype in        datehk.h
  3710.   
  3711.   Remarks             ddatetofull converts a date from the structure
  3712.                       format ddate to a string in the form
  3713.                            Month dd, Year  where
  3714.   
  3715.                            Month = the name of the month ("November")
  3716.                            dd    = the day (5, 12, etc.)
  3717.                            Year  = the year + 1900
  3718.   
  3719.   Return value        returns a pointer to the storage location
  3720.                       containing the date in string format, or NULL if
  3721.                       space could not be allocated.
  3722.   
  3723.   See also            Cal...(), date_convert(), ddatetoshort(),
  3724.                       ddatetostr(), fulltoddate(), Greg...(), Jul...(),
  3725.                       monthexpand(), shorttoddate(), strtoddate()
  3726.   
  3727.   Example             #include <datehk.h>
  3728.   
  3729.                       main()
  3730.                       {
  3731.                            struct ddate today;
  3732.                            char *strtoday;
  3733.   
  3734.                       /* assign some value to today */
  3735.                            strtoday = ddatetofull(&today);
  3736.                            printf("today is %d-%d-%d\n", today.dmon,
  3737.                                   today.dday, today.dyear);
  3738.                            printf("or %s\n", (strtoday==NULL) ?
  3739.                                   "no memory" : strtoday);
  3740.                       }
  3741.   
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.      TCHK 2.1                                                    Page 58
  3769.  
  3770.   
  3771.   Function             ddatetoshort - convert a date to short string
  3772.   
  3773.   Syntax              char *ddatetoshort(struct ddate *source); 
  3774.   
  3775.   Prototype in        datehk.h
  3776.   
  3777.   Remarks             ddatetoshort converts a date from the structure
  3778.                       format ddate to a string in the form
  3779.                            Mon dd, Year  where
  3780.   
  3781.                            Mon  = the abbreviation of the month ("Nov")
  3782.                            dd   = the day (5, 12, etc.)
  3783.                            Year = the year + 1900
  3784.   
  3785.   Return value        returns a pointer to the storage location
  3786.                       containing the date in string format, or NULL if
  3787.                       space could not be allocated.
  3788.   
  3789.   See also            Cal...(), date_convert(), ddatetofull(),
  3790.                       ddatetostr(), fulltoddate(), Greg...(), Jul...(),
  3791.                       monthexpand(), shorttoddate(), strtoddate()
  3792.   
  3793.   Example             #include <datehk.h>
  3794.   
  3795.                       main()
  3796.                       {
  3797.                            struct ddate today;
  3798.                            char *strtoday;
  3799.   
  3800.                       /* assign some value to today */
  3801.                            strtoday = ddatetoshort(&today);
  3802.                            printf("today is %d-%d-%d\n", today.dmon,
  3803.                                   today.dday, today.dyear);
  3804.                            printf("or %s\n", (strtoday==NULL) ?
  3805.                                   "no memory" : strtoday);
  3806.                       }
  3807.   
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.      TCHK 2.1                                                    Page 59
  3835.  
  3836.   
  3837.   Function             ddatetostr - convert a date to abbrev. string
  3838.   
  3839.   Syntax              char *ddatetostr(struct ddate *source);
  3840.   
  3841.   Prototype in        datehk.h
  3842.   
  3843.   Remarks             ddatetostr converts a date from the structure
  3844.                       format ddate to a string in the form mm-dd-y..y
  3845.                       where the month and day are always 2 digits long (a
  3846.                       0 is prefixed to single digit months and days) and
  3847.                       year is not altered.
  3848.   
  3849.   Return value        returns a pointer to the storage location
  3850.                       containing the date in string format, or NULL if
  3851.                       space could not be allocated.
  3852.   
  3853.   See also            Cal...(), date_convert(), ddatetofull(),
  3854.                       ddatetoshort(), ddatetostr(), fulltoddate(),
  3855.                       Greg...(), Jul...(), monthexpand(), shorttoddate(),
  3856.                       strtoddate()
  3857.   
  3858.   Example             #include <datehk.h>
  3859.   
  3860.                       main()
  3861.                       {
  3862.                            struct ddate today;
  3863.                            char *strtoday;
  3864.   
  3865.                       /* assign some value to today */
  3866.                            strtoday = ddatetostr(&today);
  3867.                            printf("today is %d-%d-%d\n", today.dmon,
  3868.                                 today.dday, today.dyear);
  3869.                            printf("or %s\n", (strtoday==NULL) ?
  3870.                                 "no memory" : strtoday);
  3871.                       }
  3872.   
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.      TCHK 2.1                                                    Page 60
  3901.  
  3902.   
  3903.   Function             depreciation - calculate depreciation for a
  3904.                                        period
  3905.   
  3906.   Syntax              double depreciation(double cost, double salvage,
  3907.                                           int life, int period, int
  3908.                                           dtype);
  3909.   
  3910.   Prototype in        finance.h
  3911.   
  3912.   Remarks             given the cost, salvage value and life of an item,
  3913.                       depreciation will calculate the amount of
  3914.                       deprecitation for the given period according to the
  3915.                       depreciation method specified by dtype. The cost
  3916.                       and salvage can be given in any unit (dollars,
  3917.                       thousands of dollars, etc.) but the life should be
  3918.                       given in depreciable periods (if you depreciate an
  3919.                       item every quarter, and the item has a life of 2
  3920.                       years, then life should be 8).
  3921.   
  3922.                       The cost and salvage values should be in the same
  3923.                       units. The life and period should be given in the
  3924.                       same units.
  3925.   
  3926.                       Types of depreciation supported by the variable
  3927.                       dtype are:
  3928.   
  3929.                            1 -  Straight line depreciation
  3930.                            2 -  Sum of the years digits depreciation
  3931.                            3 -  Double declining balance depreciation
  3932.   
  3933.                       Any other value for dtype will produce
  3934.                       unpredictable results.
  3935.   
  3936.                       No error checking is performed.
  3937.   
  3938.                       This is a generic function to calculate the
  3939.                       depreciation given all necessary information. Any
  3940.                       unnecessary information is ignored (i.e. straight
  3941.                       line depreciation does not need a period.)
  3942.   
  3943.   Return value        returns the amount of depreciation for the given
  3944.                       period in the same units as the cost, as per the
  3945.                       depreciation method specified by dtype.
  3946.   
  3947.   See also            accum_dep(), double_decline_bal_dep(),
  3948.                       straight_line_dep(), sum_year_digits_dep()
  3949.   
  3950.   Example             see demonum.c
  3951.   
  3952.   
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.      TCHK 2.1                                                    Page 61
  3967.  
  3968.   
  3969.   Function             DESQapilevel - define minimum API level required
  3970.   
  3971.   Syntax              unsigned int DESQapilevel(unsigned char major,
  3972.                                                 unsigned char minor);
  3973.   
  3974.   Prototype in        multihk.h
  3975.   
  3976.   Remarks             defines the minimum API level required. If the
  3977.                       requested API level is greater than the version of
  3978.                       DESQview, a "You need a newer version" error window
  3979.                       is popped up.
  3980.   
  3981.   Return value        returns the maximum API level, with the major
  3982.                       version number in the low order byte and the minor
  3983.                       version number in the high order byte.
  3984.   
  3985.   See also            DESQversion()
  3986.   
  3987.   
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.      TCHK 2.1                                                    Page 62
  4033.  
  4034.   
  4035.   Function             DESQappnum - DESQview program number
  4036.   
  4037.   Syntax              unsigned DESQappnum(void);
  4038.   
  4039.   Prototype in        multihk.h
  4040.   
  4041.   Remarks             determines the program number as it appears on the
  4042.                       "Switch Windows" menu.
  4043.   
  4044.   Return value        returns the program number as it appears on the
  4045.                       "Switch Windows" menu.
  4046.   
  4047.   
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.      TCHK 2.1                                                    Page 63
  4099.  
  4100.   
  4101.   Function             DESQbeginc - begin critical section
  4102.   
  4103.   Syntax              void DESQbeginc(void);
  4104.   
  4105.   Prototype in        multihk.h
  4106.   
  4107.   Remarks             used in conjunction with DESQendc(), this function
  4108.                       signals the beginning of a critical piece of code
  4109.                       that should not be interrupted. DESQview will NOT
  4110.                       multitask during critical sections of code. A
  4111.                       common instance of critical code is an interrupt
  4112.                       handler.
  4113.   
  4114.   Return value        nothing.
  4115.   
  4116.   Note                Make sure that you end all critical sections of
  4117.                       code with DESQendc() or DESQview will not switch to
  4118.                       other tasks.
  4119.   
  4120.   See also            DESQendc()
  4121.   
  4122.   
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.      TCHK 2.1                                                    Page 64
  4165.  
  4166.   
  4167.   Function             DESQcommonmem - returns measure of common memory
  4168.                                         available
  4169.   
  4170.   Syntax              void DESQcommonmem(struct DESQmemory *dm);
  4171.   
  4172.   Prototype in        multihk.h
  4173.   
  4174.   Remarks             determines the amount of available common memory
  4175.                       under DESQview. No error checking is performed.
  4176.   
  4177.                       DESQcommonmem returns the amount of available
  4178.                       common memory in dm. The values returned are in
  4179.                       bytes.
  4180.   
  4181.   Return value        nothing.
  4182.   
  4183.   See also            DESQconvenmem(), DESQexpandedmem()
  4184.   
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.      TCHK 2.1                                                    Page 65
  4231.  
  4232.   
  4233.   Function             DESQconvenmem - returns measure of conventional
  4234.                                         memory available
  4235.   
  4236.   Syntax              void DESQconvenmem(struct DESQmemory *dm);
  4237.   
  4238.   Prototype in        multihk.h
  4239.   
  4240.   Remarks             determines the amount of available conventional
  4241.                       memory under DESQview. No error checking is
  4242.                       performed.
  4243.   
  4244.                       DESQconvenmem returns the amount of available
  4245.                       conventional memory in dm. The values returned are
  4246.                       in Kbytes.
  4247.   
  4248.   Return value        nothing.
  4249.   
  4250.   See also            DESQcommonmem(), DESQexpandedmem()
  4251.   
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.      TCHK 2.1                                                    Page 66
  4297.  
  4298.   
  4299.   Function             DESQdisperror - popup a DESQview error window
  4300.   
  4301.   Syntax              unsigned DESQdisperror(char *msg,
  4302.                                              unsigned char width,
  4303.                                              unsigned char height,
  4304.                                              unsigned segment,
  4305.                                              unsigned flags);
  4306.   
  4307.   Prototype in        multihk.h
  4308.   
  4309.   Remarks             DESQdisperror() will popup an error window under
  4310.                       DESQview, displaying the string msg. The message
  4311.                       must be less than 4K (<4096 bytes) in size. The
  4312.                       window will be of size width by height. If either
  4313.                       or both values are zero, the default values will be
  4314.                       used. The segment is segment of the object handle,
  4315.                       and the flags is a bit field with the following
  4316.                       important values:
  4317.   
  4318.                            bits 13,14:  which mouse button will remove
  4319.                                         the window
  4320.                                      00 or 11 = either
  4321.                                      01 = left
  4322.                                      10 = right
  4323.                            bit 15:  beep when displayed
  4324.   
  4325.                       For your convenience, DVERROR_LEFT, DVERROR_RIGHT,
  4326.                       DVERROR_EITHER and DVERROR_BEEP have been #defined
  4327.                       in multihk.h.
  4328.   
  4329.   Return value        returns 1 if the left mouse button was pressed, 2
  4330.                       if the right mouse button was pressed and 27 if ESC
  4331.                       was pressed.
  4332.   
  4333.   
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.      TCHK 2.1                                                    Page 67
  4363.  
  4364.   
  4365.   Function             DESQendc - end critical section
  4366.   
  4367.   Syntax              void DESQendc(void);
  4368.   
  4369.   Prototype in        multihk.h
  4370.   
  4371.   Remarks             used in conjunction with DESQbeginc(), this
  4372.                       function signals the end of a critical piece of
  4373.                       code that should not be interrupted. DESQview will
  4374.                       NOT multitask during critical sections of code. A
  4375.                       common instance of critical code is an interrupt
  4376.                       handler.
  4377.   
  4378.   Return value        nothing.
  4379.   
  4380.   Note                Make sure that you end all critical sections of
  4381.                       code with DESQendc() or DESQview will not switch to
  4382.                       other tasks.
  4383.   
  4384.   See also            DESQbeginc()
  4385.   
  4386.   
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.      TCHK 2.1                                                    Page 68
  4429.  
  4430.   
  4431.   Function             DESQexit - exit program in DESQview
  4432.   
  4433.   Syntax              void DESQexit(void);
  4434.   
  4435.   Prototype in        multihk.h
  4436.   
  4437.   Remarks             exits the current program under DESQview (and
  4438.                       possibly Topview). No error checking is performed.
  4439.   
  4440.   Return value        nothing.
  4441.   
  4442.   
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.      TCHK 2.1                                                    Page 69
  4495.  
  4496.   
  4497.   Function             DESQexpandedmem - returns measure of expanded
  4498.                                           memory available
  4499.   
  4500.   Syntax              void DESQexpanded(struct DESQmemory *dm);
  4501.   
  4502.   Prototype in        multihk.h
  4503.   
  4504.   Remarks             determines the amount of available expanded memory
  4505.                       under DESQview. No error checking is performed.
  4506.   
  4507.                       DESQexpandedmed returns the amount of available
  4508.                       expanded memory in dm. The values returned are in
  4509.                       Kbytes.
  4510.   
  4511.   Return value        nothing.
  4512.   
  4513.   See also            DESQcommonmem(), DESQconvenmem()
  4514.   
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.      TCHK 2.1                                                    Page 70
  4561.  
  4562.   
  4563.   Function             DESQgetbuf - get DESQview virtual screen info
  4564.   
  4565.   Syntax              char far *DESQgetbuf(unsigned segment,
  4566.                                            unsigned *size);
  4567.   
  4568.   Prototype in        multihk.h
  4569.   
  4570.   Remarks             this function will return a far pointer to the
  4571.                       virtual screen buffer for the window specified by
  4572.                       segment, where segment is the segment of the object
  4573.                       handle for the window. If segment is zero, the
  4574.                       default will be used. The size parameter will be
  4575.                       used to return the size of the virtual screen in
  4576.                       bytes.
  4577.   
  4578.   Return value        returns a far pointer to the virtual screen for the
  4579.                       specified window.
  4580.   
  4581.   
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.      TCHK 2.1                                                    Page 71
  4627.  
  4628.   
  4629.   Function             DESQgetmem - allocate DESQview "system" memory
  4630.   
  4631.   Syntax              char far *DESQgetmem(size_t size);
  4632.   
  4633.   Prototype in        multihk.h
  4634.   
  4635.   Remarks             allocates a piece of DESQview "system" (common)
  4636.                       memory of size bytes.
  4637.   
  4638.   Return value        returns a far pointer to the memory allocated.
  4639.   
  4640.   Note                When freeing DESQview system memory, be sure to use
  4641.                       DESQputmem() and not free().
  4642.   
  4643.   See also            DESQputmem()
  4644.   
  4645.   
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.      TCHK 2.1                                                    Page 72
  4693.  
  4694.   
  4695.   Function             DESQiskmouse - is mouse emulated via keyboard
  4696.   
  4697.   Syntax              boolean DESQiskmouse(void);
  4698.   
  4699.   Prototype in        multihk.h
  4700.   
  4701.   Remarks             determines if the keyboard is being used to emulate
  4702.                       a mouse under DESQview.
  4703.   
  4704.   Return value        returns TRUE if the keyboard is being used to
  4705.                       emulate a mouse, FALSE otherwise.
  4706.   
  4707.   See also            DESQkmouse_off(), DESQkmouse_on()
  4708.   
  4709.   
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.      TCHK 2.1                                                    Page 73
  4759.  
  4760.   
  4761.   Function             DESQjustify - set automatic window justification
  4762.   
  4763.   Syntax              void DESQjustify(boolean enable);
  4764.   
  4765.   Prototype in        multihk.h
  4766.   
  4767.   Remarks             sets the automatic window justification for the
  4768.                       current window. If enable is TRUE, the window's
  4769.                       contents will change to keep the cursor visible at
  4770.                       all times. If enable is FALSE, the window's
  4771.                       contents will not change automatically, so the
  4772.                       cursor may disappear from view.
  4773.   
  4774.   Return value        nothing.
  4775.   
  4776.   
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.      TCHK 2.1                                                    Page 74
  4825.  
  4826.   
  4827.   Function             DESQkmouse_off - disable keyboard mouse emulation
  4828.   
  4829.   Syntax              void DESQkmouse_off(void);
  4830.   
  4831.   Prototype in        multihk.h
  4832.   
  4833.   Remarks             disables keyboard emulation of a mouse under
  4834.                       DESQview.
  4835.   
  4836.   Return value        nothing.
  4837.   
  4838.   See also            DESQiskmouse(), DESQkmouse_on()
  4839.   
  4840.   
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.      TCHK 2.1                                                    Page 75
  4891.  
  4892.   
  4893.   Function             DESQkmouse_on - enable keyboard mouse emulation
  4894.   
  4895.   Syntax              void DESQkmouse_on(void);
  4896.   
  4897.   Prototype in        multihk.h
  4898.   
  4899.   Remarks             enables keyboard emulation of a mouse under
  4900.                       DESQview.
  4901.   
  4902.   Return value        nothing.
  4903.   
  4904.   See also            DESQiskmouse(), DESQkmouse_off()
  4905.   
  4906.   
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.      TCHK 2.1                                                    Page 76
  4957.  
  4958.   
  4959.   Function             DESQostack - switch to DESQview's internal stack
  4960.   
  4961.   Syntax              void DESQostack(void);
  4962.   
  4963.   Prototype in        multihk.h
  4964.   
  4965.   Remarks             switches the stack used to DESQview's internal
  4966.                       stack. No error checking is performed.
  4967.   
  4968.   Return value        nothing.
  4969.   
  4970.   See also            DESQustack()
  4971.   
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.      TCHK 2.1                                                    Page 77
  5023.  
  5024.   
  5025.   Function             DESQpause - give up CPU time
  5026.   
  5027.   Syntax              void DESQpause(void);
  5028.   
  5029.   Prototype in        multihk.h
  5030.   
  5031.   Remarks             this function will free the remaining CPU cycles
  5032.                       under DESQview, Topview and Taskview. I have tested
  5033.                       this function only under DESQview, where it frees
  5034.                       the program's time slice. If your program will just
  5035.                       sit idle and chew up CPU time, calling this
  5036.                       function frees whatever remains of its cpu share.
  5037.   
  5038.                       No error checking is performed.
  5039.   
  5040.   Return value        nothing.
  5041.   
  5042.   See also            DESQposttask(), DESQstart(), DESQstop()
  5043.   
  5044.   Example             ...  /* code fragment */
  5045.                       while (bioskey(1) == 0)  /* wait for keypress */
  5046.                            DESQpause();        /* w/o wasting cpu time */
  5047.                       ...
  5048.   
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.      TCHK 2.1                                                    Page 78
  5089.  
  5090.   
  5091.   Function             DESQpoke - displays a char on the status line
  5092.   
  5093.   Syntax              char DESQpoke(char c);
  5094.   
  5095.   Prototype in        multihk.h
  5096.   
  5097.   Remarks             displays a character on the status line. No error
  5098.                       checking is performed.
  5099.   
  5100.   Return value        DESQpoke returns the .
  5101.   
  5102.   See also            DESQdisperror()
  5103.   
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.      TCHK 2.1                                                    Page 79
  5155.  
  5156.   
  5157.   Function             DESQposttask - awaken DESQview task
  5158.   
  5159.   Syntax              void DESQposttask(unsigned segment);
  5160.   
  5161.   Prototype in        multihk.h
  5162.   
  5163.   Remarks             awakens a DESQview task given the segment of its
  5164.                       object handle.
  5165.   
  5166.   Return value        nothing.
  5167.   
  5168.   See also            DESQpause(), DESQstart(), DESQstop()
  5169.   
  5170.   
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.      TCHK 2.1                                                    Page 80
  5221.  
  5222.   
  5223.   Function             DESQpushkey - put key into keyboard input stream
  5224.   
  5225.   Syntax              void DESQpushkey(unsigned scancode);
  5226.   
  5227.   Prototype in        multihk.h
  5228.   
  5229.   Remarks             puts the scancode given into the keyboard input
  5230.                       stream. The scancode given should be the scan code
  5231.                       as returned by the BIOS.
  5232.   
  5233.   Return value        nothing.
  5234.   
  5235.   
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.      TCHK 2.1                                                    Page 81
  5287.  
  5288.   
  5289.   Function             DESQputmem - deallocate DESQview "system" memory
  5290.   
  5291.   Syntax              void DESQputmem(char far *block);
  5292.   
  5293.   Prototype in        multihk.h
  5294.   
  5295.   Remarks             deallocates a piece of DESQview "system" (common)
  5296.                       previously allocated via DESQgetmem().
  5297.   
  5298.   Return value        nothing.
  5299.   
  5300.   Note                When freeing DESQview system memory, be sure to use
  5301.                       DESQputmem() and not free().
  5302.   
  5303.   See also            DESQgetmem()
  5304.   
  5305.   
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.      TCHK 2.1                                                    Page 82
  5353.  
  5354.   
  5355.   Function             DESQsound - makes a tone under DESQview
  5356.   
  5357.   Syntax              void DESQsound(int frequency, int duration);
  5358.   
  5359.   Prototype in        multihk.h
  5360.   
  5361.   Remarks             DESQsound will generate a tone of frequency in Hz
  5362.                       for duration clock ticks (approximately 18.2
  5363.                       ticks/sec). No error checking is performed.
  5364.   
  5365.   Return value        nothing.
  5366.   
  5367.   
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.      TCHK 2.1                                                    Page 83
  5419.  
  5420.   
  5421.   Function             DESQstart - start (unFreeze) a task
  5422.   
  5423.   Syntax              void DESQstart(unsigned segment);
  5424.   
  5425.   Prototype in        multihk.h
  5426.   
  5427.   Remarks             DESQstart() will continue the task given the
  5428.                       segment of its object handle. This is equivalent to
  5429.                       unFreezing a program.
  5430.   
  5431.   Return value        nothing.
  5432.   
  5433.   See also            DESQpause(), DESQposttask(), DESQstop()
  5434.   
  5435.   
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.      TCHK 2.1                                                    Page 84
  5485.  
  5486.   
  5487.   Function             DESQstop - stop (Freeze) the current task
  5488.   
  5489.   Syntax              void DESQstop(unsigned segment);
  5490.   
  5491.   Prototype in        multihk.h
  5492.   
  5493.   Remarks             DESQstop() will stop the task given the segment of
  5494.                       its object handle. This is equivalent to Freezing a
  5495.                       program.
  5496.   
  5497.   Return value        nothing.
  5498.   
  5499.   Note                under DESQview 2.00, this function is ignored
  5500.                       unless the task indicated is the current task
  5501.                       (segment == handle of main window for task)
  5502.   
  5503.   See also            DESQpause(), DESQposttask(), DESQstart()
  5504.   
  5505.   
  5506.  
  5507.  
  5508.  
  5509.  
  5510.  
  5511.  
  5512.  
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.      TCHK 2.1                                                    Page 85
  5551.  
  5552.   
  5553.   Function             DESQustack -  switch back to program's stack
  5554.   
  5555.   Syntax              void DESQustack(void);
  5556.   
  5557.   Prototype in        multihk.h
  5558.   
  5559.   Remarks             switches the stack from DESQview's internal stack
  5560.                       back to the program's stack. No error checking is
  5561.                       performed.
  5562.   
  5563.   Return value        nothing.
  5564.   
  5565.   See also            DESQostack()
  5566.   
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.      TCHK 2.1                                                    Page 86
  5617.  
  5618.   
  5619.   Function             DESQversion - DESQview version
  5620.   
  5621.   Syntax              int DESQversion(void);
  5622.   
  5623.   Prototype in        multihk.h
  5624.   
  5625.   Remarks             determines if DESQview is running and gets the
  5626.                       version number
  5627.   
  5628.   Return value        returns zero if DESQview is not running, otherwise
  5629.                       returns the version number with the major version
  5630.                       number in the high order byte and the minor version
  5631.                       number in the low order byte.
  5632.   
  5633.   Note                Now that I've gotten this function to work properly
  5634.                       for DESQview, I do not guarrantee it's accuracy
  5635.                       with regards to Topview or Taskview. If someone out
  5636.                       there with access to either could test it out and
  5637.                       let me know I'd appreciate it.
  5638.   
  5639.   See also            DESQapilevel()
  5640.   
  5641.   Example             #include <multihk.h>
  5642.   
  5643.                       main()
  5644.                       {
  5645.                            unsigned int ver;
  5646.   
  5647.                            if ((ver = DESQversion()) == 0)
  5648.                                 printf("DESQview is not running\n");
  5649.                            else
  5650.                                 printf("DESQview version %d.%2d\n",
  5651.                                      (ver&0xFF00)>>8, ver&0x00FF);
  5652.                       }
  5653.   
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.      TCHK 2.1                                                    Page 87
  5683.  
  5684.   
  5685.   Function             diffddate - calculate the difference in 2 dates
  5686.   
  5687.   Syntax              long int diffddate(struct ddate *start,
  5688.                                           struct ddate *fini);
  5689.   
  5690.   Prototype in        datehk.h
  5691.   
  5692.   Remarks             diffdate calculates the difference in days between
  5693.                       start and fini (fini - start).
  5694.   
  5695.                       diffdate does not perform any error checking on the
  5696.                       passed parameters.
  5697.   
  5698.   Return value        returns the number of days from start to fini.
  5699.   
  5700.   See also            dayofyear(), daysleft(), diffddate()
  5701.   
  5702.   Example             #include <datehk.h>
  5703.   
  5704.                       main()
  5705.                       {
  5706.                            struct ddate begin, end;
  5707.                            long int days;
  5708.   
  5709.                            /* set begin to Jan 1, 1981 */
  5710.                            /* set end to Feb 5, 1982 */
  5711.                            days = diffdate(&begin,&end);
  5712.                            printf("Feb 5, 1982 - Jan 1, 1981 =
  5713.                                 %ld\n",days);
  5714.                       }
  5715.   
  5716.   Program output      Feb 5, 1982 - Jan 1, 1981 = 400
  5717.   
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.      TCHK 2.1                                                    Page 88
  5749.  
  5750.   
  5751.   Function             diskchanged - has the disk has been changed
  5752.   
  5753.   Syntax              boolean diskchanged(int drive);
  5754.   
  5755.   Prototype in        ibm.h
  5756.   
  5757.   Remarks             diskchanged determines if the disk has been changed
  5758.                       since the last access via INT 0x13, Function 0x16.
  5759.                       The drive parameter corresponds to the drive
  5760.                       letter, 0 = A:, 1 = B:, etc.
  5761.   
  5762.   Return value        returns TRUE if the disk has been changd since the
  5763.                       last access and FALSE otherwise.
  5764.   
  5765.   Note                This function valid only on AT, XT2, XT286,
  5766.                       Convertible and PS/2.
  5767.   
  5768.   See also            disktype()
  5769.   
  5770.   
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.  
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.      TCHK 2.1                                                    Page 89
  5815.  
  5816.   
  5817.   Function             disktype - identify disk type
  5818.   
  5819.   Syntax              byte disktype(byte drive);
  5820.   
  5821.   Prototype in        ibm.h
  5822.   
  5823.   Remarks             disktype will determine the type of disk in the
  5824.                       disk drive being tested. drive specifies the drive
  5825.                       to check. Set drive to zero to specify the default
  5826.                       drive, one is A:, two is B:, etc.
  5827.   
  5828.   Return value        returns the drive id byte. See ibm.h for more
  5829.                       details.
  5830.   
  5831.   See also            diskchanged()
  5832.   
  5833.   Example             see demodisk.c
  5834.   
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.      TCHK 2.1                                                    Page 90
  5881.  
  5882.   
  5883.   Function             dosday - extract day from file date stamp
  5884.   
  5885.   Syntax              #include <doshk.h>
  5886.                       (unsigned) dosday(d)
  5887.   
  5888.   Prototype in        doshk.h
  5889.   
  5890.   Remarks             extracts the day from a DOS file date stamp. Refer
  5891.                       to a DOS reference book (Advanced MS-DOS by Ray
  5892.                       Duncan recommended) for further details.
  5893.   
  5894.                       This function is a macro.
  5895.   
  5896.   Return value        returns the day of a DOS file date stamp.
  5897.   
  5898.   See also            doshour(), dosmonth(), dosmin(), dossec(),
  5899.                       dosyear(), todosdate(), todostime()
  5900.   
  5901.   
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.      TCHK 2.1                                                    Page 91
  5947.  
  5948.   
  5949.   Function             doshour - extract hour from file time stamp
  5950.   
  5951.   Syntax              #include <doshk.h>
  5952.                       (unsigned) doshour(h)
  5953.   
  5954.   Prototype in        doshk.h
  5955.   
  5956.   Remarks             extracts the hour from a DOS file time stamp. Refer
  5957.                       to a DOS reference book (Advanced MS-DOS by Ray
  5958.                       Duncan recommended) for further details.
  5959.   
  5960.                       This function is a macro.
  5961.   
  5962.   Return value        returns the hour of a DOS file time stamp.
  5963.   
  5964.   See also            dosday(), dosmonth(), dosmin(), dossec(),
  5965.                       dosyear(), todosdate(), todostime()
  5966.   
  5967.   
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.      TCHK 2.1                                                    Page 92
  6013.  
  6014.   
  6015.   Function             dosmonth - extract hour from file date stamp
  6016.   
  6017.   Syntax              #include <doshk.h>
  6018.                       (unsigned) dosmonth(m)
  6019.   
  6020.   Prototype in        doshk.h
  6021.   
  6022.   Remarks             extracts the month from a DOS file date stamp.
  6023.                       Refer to a DOS reference book (Advanced MS-DOS by
  6024.                       Ray Duncan recommended) for further details.
  6025.   
  6026.                       This function is a macro.
  6027.   
  6028.   Return value        returns the hour of a DOS file date stamp.
  6029.   
  6030.   See also            dosday(), doshour(), dosmin(), dossec(), dosyear(),
  6031.                       todosdate(), todostime()
  6032.   
  6033.   
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.      TCHK 2.1                                                    Page 93
  6079.  
  6080.   
  6081.   Function             dosmin - extract minutes from file time stamp
  6082.   
  6083.   Syntax              #include <doshk.h>
  6084.                       (unsigned) dosmin(m)
  6085.   
  6086.   Prototype in        doshk.h
  6087.   
  6088.   Remarks             extracts the minutes from a DOS file time stamp.
  6089.                       Refer to a DOS reference book (Advanced MS-DOS by
  6090.                       Ray Duncan recommended) for further details.
  6091.   
  6092.                       This function is a macro.
  6093.   
  6094.   Return value        returns the minutes of a DOS file time stamp.
  6095.   
  6096.   See also            dosday(), doshour(), dosmonth(), dossec(),
  6097.                       dosyear(), todosdate(), todostime()
  6098.   
  6099.   
  6100.  
  6101.  
  6102.  
  6103.  
  6104.  
  6105.  
  6106.  
  6107.  
  6108.  
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.      TCHK 2.1                                                    Page 94
  6145.  
  6146.   
  6147.   Function             dossec - extract seconds from file time stamp
  6148.   
  6149.   Syntax              #include <doshk.h>
  6150.                       (unsigned) dossec(s)
  6151.   
  6152.   Prototype in        doshk.h
  6153.   
  6154.   Remarks             extracts the seconds from a DOS file time stamp.
  6155.                       Refer to a DOS reference book (Advanced MS-DOS by
  6156.                       Ray Duncan recommended) for further details.
  6157.   
  6158.                       This function is a macro.
  6159.   
  6160.   Return value        returns the hour of a DOS file time stamp.
  6161.   
  6162.   See also            dosday(), doshour(), dosmonth(), dosmin(),
  6163.                       dosyear(), todosdate(), todostime()
  6164.   
  6165.   
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.      TCHK 2.1                                                    Page 95
  6211.  
  6212.   
  6213.   Function             dostimetolong - convert DOS time to 1/100 seconds
  6214.   
  6215.   Syntax              long dostimetolong(struct time *t);
  6216.   
  6217.   Prototype in        timehk.h
  6218.   
  6219.   Remarks             this function will convert the time from a DOS time
  6220.                       structure to a long value of the time in 1/100s of
  6221.                       a second.
  6222.   
  6223.   Return value        returns the time as a count of 1/100 secs since
  6224.                       midnight, ranging from 0 (midnight) to 8639999
  6225.                       (11:59:59.99 PM).
  6226.   
  6227.   See also            longtodostime()
  6228.   
  6229.   
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.      TCHK 2.1                                                    Page 96
  6277.  
  6278.   
  6279.   Function             dosyear - extract year from file date stamp
  6280.   
  6281.   Syntax              #include <doshk.h>
  6282.                       (unsigned) dosyear(y)
  6283.   
  6284.   Prototype in        doshk.h
  6285.   
  6286.   Remarks             extracts the year from a DOS file date stamp. Refer
  6287.                       to a DOS reference book (Advanced MS-DOS by Ray
  6288.                       Duncan recommended) for further details.
  6289.   
  6290.                       This function is a macro.
  6291.   
  6292.   Return value        returns the year of a DOS file date stamp.
  6293.   
  6294.   See also            dosday(), doshour(), dosmonth(), dosmin(),
  6295.                       dossec(), todosdate(), todostime()
  6296.   
  6297.   
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.      TCHK 2.1                                                    Page 97
  6343.  
  6344.   
  6345.   Function             double_decline_bal_dep - calculate double
  6346.                                                  declining balance
  6347.                                                  depreciation
  6348.   
  6349.   Syntax              double double_decline_bal_dep(double cost, int
  6350.                                                     life, int period);
  6351.   
  6352.   Prototype in        finance.h
  6353.   
  6354.   Remarks             given the cost and life of an item,
  6355.                       double_decline_bal_dep will calculate the amount of
  6356.                       deprecitation for the given period according to the
  6357.                       double declining balance depreciation method. The
  6358.                       cost can be given in any unit (dollars, thousands
  6359.                       of dollars, etc.) but the life should be given in
  6360.                       depreciable periods (if you depreciate an item
  6361.                       every quarter, and the item has a life of 2 years,
  6362.                       then life should be 8).
  6363.   
  6364.                       The life and period should be given in the same
  6365.                       units.
  6366.   
  6367.                       No error checking is performed.
  6368.   
  6369.   Return value        returns the amount of depreciation for the given
  6370.                       period in the same units as the cost, as per the
  6371.                       double declining balance depreciation method.
  6372.   
  6373.   Note                The macro DDB(c,l,p) is defined in finance.h for
  6374.                       ease of use.
  6375.   
  6376.   See also            accum_dep(), depreciation(), straight_line_dep(),
  6377.                       sum_year_digits_dep()
  6378.   
  6379.   Example             see demonum.c
  6380.   
  6381.   
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.      TCHK 2.1                                                    Page 98
  6409.  
  6410.   
  6411.   Function             DoubleDOSfreeCPU - give up CPU time under
  6412.                                            Double DOS
  6413.   
  6414.   Syntax              void DoubleDOSfreeCPU(byte slices);
  6415.   
  6416.   Prototype in        multihk.h
  6417.   
  6418.   Remarks             DoubleDOSfreeCPU frees up CPU time from the current
  6419.                       program. The amount of time freed up is found by
  6420.                       slices * 55ms.
  6421.   
  6422.   Return value        nothing.
  6423.   
  6424.   See also            DoubleDOSGetVirtual(), DoubleDOSTaskSwitch(),
  6425.                       isDoubleDOS(), isInvisible()
  6426.   
  6427.   Example             #include <multihk.h>
  6428.   
  6429.                       main()
  6430.                       {
  6431.                            DoubleDOSfreeCPU(1000);  /* frees 55 secs */
  6432.                       }
  6433.   
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.      TCHK 2.1                                                    Page 99
  6475.  
  6476.   
  6477.   Function             DoubleDOSGetVirtual - get DoubleDOS virtual
  6478.                                               screen address
  6479.   
  6480.   Syntax              unsigned int DoubleDOSGetVirtual(void);
  6481.   
  6482.   Prototype in        multihk.h
  6483.   
  6484.   Remarks             determines and returns the segment of the virtual
  6485.                       screen address for the current task.
  6486.   
  6487.   Return value        DoubleDOSGetVirtual returns the segment of the
  6488.                       virtual screen address
  6489.   
  6490.   See also            DoubleDOSfreeCPU(), DoubleDOSTaskSwitch(),
  6491.                       isDoubleDOS(), isInvisible()
  6492.   
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.      TCHK 2.1                                                    Page 100
  6541.  
  6542.   
  6543.   Function             DoubleDOSTaskSwitch - set Double DOS task
  6544.                                               switching on/off
  6545.   
  6546.   Syntax              void DoubleDOSTaskSwitch(boolean on);
  6547.   
  6548.   Prototype in        multihk.h
  6549.   
  6550.   Remarks             sets Double DOS task switching on or off.
  6551.   
  6552.   Return value        nothing.
  6553.   
  6554.   See also            DoubleDOSfreeCPU(), DoubleDOSGetVirtual(),
  6555.                       isDoubleDOS(), isInvisible()
  6556.   
  6557.   Example             #include <multihk.h>
  6558.   
  6559.                       #define ENABLE      TRUE
  6560.   
  6561.                       main()
  6562.                       {
  6563.                            DoubleDOSTaskSwitch(ENABLE);
  6564.                       }
  6565.   
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.      TCHK 2.1                                                    Page 101
  6607.  
  6608.   
  6609.   Function             EMMversion - version of Expanded Memory Manager
  6610.   
  6611.   Syntax              boolean EMMversion(byte *version);
  6612.   
  6613.   Prototype in        ibm.h
  6614.   
  6615.   Remarks             determines the version of the Expanded Memory
  6616.                       Manager. No memory is allocated.
  6617.   
  6618.   Return value        returns TRUE if successful (and *version is the
  6619.                       version id,) FALSE if an error occurred (and
  6620.                       *version is the error code.)
  6621.   
  6622.   Note                this function is available under EMM 3.2 specs.
  6623.   
  6624.   See also            ibm.h
  6625.                       EMSGetStatus(), isEMSavail(), ESMinfo(),
  6626.                       EMSpages(), EMSwarmbootprep()
  6627.   
  6628.   Example             #include <ibm.h>
  6629.   
  6630.                       main()
  6631.                       {
  6632.                            byte ver;
  6633.   
  6634.                            if (isEMSavail())
  6635.                                 if (EMMversion(&ver))    /* success */
  6636.                                      printf("EMM version id %X\n",ver);
  6637.                                 else                /* error */
  6638.                                      printf("EMM error code %X\n",ver);
  6639.                       }
  6640.   
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.  
  6671.  
  6672.      TCHK 2.1                                                    Page 102
  6673.  
  6674.   
  6675.   Function             EMSGetStatus - get Expanded Memory status
  6676.   
  6677.   Syntax              byte EMSGetStatus(void);
  6678.   
  6679.   Prototype in        ibm.h
  6680.   
  6681.   Remarks             EMSGetStatus tests whether the expanded memory
  6682.                       hardware is functional. This function should only
  6683.                       be made after it has been established that EMS is
  6684.                       available and the EMM is ready (via isEMSavail()).
  6685.                       This is not a substitute to determine if EMS is
  6686.                       available.
  6687.   
  6688.   Return value        returns the EMM error code. If zero is returned,
  6689.                       the function is successful. If any other value is
  6690.                       returned, an error has occurred.
  6691.   
  6692.   Note                this function is available under EMM 3.2 specs.
  6693.   
  6694.   See also            ibm.h
  6695.                       EMMversion(), EMSinfo(), EMSpages(),
  6696.                       EMSwarmbootprep(), isEMSavail()
  6697.   
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.      TCHK 2.1                                                    Page 103
  6739.  
  6740.   
  6741.   Function             EMSinfo - determines EMM version and EMS pages
  6742.   
  6743.   Syntax              boolean EMSinfo(struct EMSrecord *ems);
  6744.   
  6745.   Prototype in        ibm.h
  6746.   
  6747.   Remarks             if EMS is available, EMSinfo() determines the EMM
  6748.                       version number and the total and available pages.
  6749.                       This information is saved in the ems structure
  6750.                       passed to EMSinfo().
  6751.   
  6752.                       This function is similar to isEMSavail() and
  6753.                       EMSpages()
  6754.   
  6755.   Return value        returns TRUE if EMS is available and no errors were
  6756.                       encountered. On an error, FALSE is returned and
  6757.                       ems->emserror will contain the error code.
  6758.   
  6759.   Note                this function is available under EMM 3.2 specs.
  6760.   
  6761.   See also            ibm.h
  6762.                       EMMversion(), EMSGetStatus(), isEMSavail(),
  6763.                       EMSpages(), EMSwarmbootprep()
  6764.   
  6765.   Example             #include <ibm.h>
  6766.   
  6767.                       main()
  6768.                       {
  6769.                            struct EMSrecord ems;
  6770.   
  6771.                            if (EMSinfo(&ems)) {
  6772.                                 printf("EMM version id: %X\n",
  6773.                                        ems.version);
  6774.                                 printf("Total pages: %u\n",
  6775.                                        ems.totalpages);
  6776.                                 printf("Avail pages: %u\n",
  6777.                                        ems.availpages);
  6778.                            } else                   /* error */
  6779.                                 printf("EMM error code %X\n",
  6780.                                        ems.emserror);
  6781.                       }
  6782.   
  6783.  
  6784.  
  6785.  
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.      TCHK 2.1                                                    Page 104
  6805.  
  6806.   
  6807.   Function             EMSpages - determines the total and available
  6808.                                    amount of pages of EMS memory
  6809.   
  6810.   Syntax              boolean EMSpages(struct EMSrecord *ems);
  6811.   
  6812.   Prototype in        ibm.h
  6813.   
  6814.   Remarks             EMSpages() determines the total and available
  6815.                       amount of pages of EMS memory. This information is
  6816.                       saved in the ems structure passed to EMSpages().
  6817.   
  6818.   Return value        returns TRUE if no errors were encountered. On an
  6819.                       error, FALSE is returned and ems->emserror will
  6820.                       contain the error code.
  6821.   
  6822.   Note                this function is available under EMM 3.2 specs.
  6823.   
  6824.   See also            ibm.h
  6825.                       EMMversion(), EMSGetStatus(), isEMSavail(),
  6826.                       ESMinfo(), EMSwarmbootprep()
  6827.   
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.      TCHK 2.1                                                    Page 105
  6871.  
  6872.   
  6873.   Function             EMSwarmbootprep - prepares the EMM for warm boot
  6874.   
  6875.   Syntax              int EMSwarmbootprep(void);
  6876.   
  6877.   Prototype in        ibm.h
  6878.   
  6879.   Remarks             EMSwarmbootprep tells the Expanded Memory Manager
  6880.                       to prepare for a warm boot.
  6881.   
  6882.   Return value        returns the EMM error code. If no errors occurred,
  6883.                       zero is returned. See ibm.h for a list of EMM error
  6884.                       codes.
  6885.   
  6886.   Note                this function is available under EMM 4.0 specs.
  6887.   
  6888.   See also            ibm.h
  6889.                       EMMversion(), EMSGetStatus(), isEMSavail(),
  6890.                       ESMinfo(), EMSpages()
  6891.   
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.      TCHK 2.1                                                    Page 106
  6937.  
  6938.   
  6939.   Function             endstri - get offset to last char of a string
  6940.   
  6941.   Syntax              #include <stringhk.h>
  6942.                       (int) endstri(s)
  6943.   
  6944.   Prototype in        stringhk.h
  6945.   
  6946.   Remarks             gets an offset to the last character of a string.
  6947.   
  6948.                       This function is a macro. Strings of length 0 will
  6949.                       produce unpredictable results.
  6950.   
  6951.   Return value        returns an int offset to the last character in the
  6952.                       string s.
  6953.   
  6954.   See also            endstri()
  6955.   
  6956.   
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962.  
  6963.  
  6964.  
  6965.  
  6966.  
  6967.  
  6968.  
  6969.  
  6970.  
  6971.  
  6972.  
  6973.  
  6974.  
  6975.  
  6976.  
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.      TCHK 2.1                                                    Page 107
  7003.  
  7004.   
  7005.   Function             endstrp - get pointer to last char of a string
  7006.   
  7007.   Syntax              #include <stringhk.h>
  7008.                       (char *) endstrp(s)
  7009.   
  7010.   Prototype in        stringhk.h
  7011.   
  7012.   Remarks             gets a pointer to the last character of a string.
  7013.   
  7014.                       This function is a macro. Strings of length 0 will
  7015.                       produce unpredictable results.
  7016.   
  7017.   Return value        returns a pointer to the last character in the
  7018.                       string s.
  7019.   
  7020.   See also            endstri()
  7021.   
  7022.   
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.      TCHK 2.1                                                    Page 108
  7069.  
  7070.   
  7071.   Function             expandfilespec - expand a filespec into a full
  7072.                                          DOS filepathname
  7073.   
  7074.   Syntax              char *expandfilespec(char *filespec, char *dest);
  7075.   
  7076.   Prototype in        filehk.h
  7077.   
  7078.   Remarks             expandfilespec will take a DOS filespec (optional
  7079.                       drive, optional path, optional file name) and
  7080.                       expand it into a full filepathname, consisting of
  7081.                       drive, path and file name. Any information needed
  7082.                       to make a fully explicit filepathname
  7083.                       (d:\path\filename.exe) not provided by filespec
  7084.                       will be retrieved as the current drive and path,
  7085.                       with the filename.ext wildcarded appropriately.
  7086.   
  7087.                       dest must be a pointer to an allocated piece of
  7088.                       memory large enough to hold the full filepathname
  7089.                       (d:\path\filename.ext).
  7090.   
  7091.                       expandfilespec() relies on parsefilename() to break
  7092.                       s into its respective parts (drive, path and
  7093.                       filename.) Thus, any restrictions applying to
  7094.                       parsefilename() also apply to getfilespec().
  7095.   
  7096.   Return value        returns dest.
  7097.   
  7098.   See also            getfilespec(), isdir(), parsefilename(),
  7099.                       parsefnameext()
  7100.   
  7101.   
  7102.  
  7103.  
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.      TCHK 2.1                                                    Page 109
  7135.  
  7136.   
  7137.   Function             Extendedtotal - total Extended memory installed
  7138.   
  7139.   Syntax              int Extendedtotal(void);
  7140.   
  7141.   Prototype in        ibm.h
  7142.   
  7143.   Remarks             detects the total amount of Extended memory
  7144.                       installed.
  7145.   
  7146.   Return value        returns the total Extended memory installed, in
  7147.                       Kbytes.
  7148.   
  7149.   Note                you should check for the presence of Extended
  7150.                       memory with isExtended() before using this
  7151.                       function. Calling Extendedtotal() when no Extended
  7152.                       memory is present can lead to unpredictable
  7153.                       results.
  7154.   
  7155.   See also            isExtended()
  7156.   
  7157.   Example             #include <ibm.h>
  7158.   
  7159.                       main()
  7160.                       {
  7161.                            printf("Total Extended Memory is %dK\n",
  7162.                                 Extendedtotal());
  7163.                       }
  7164.   
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.  
  7200.      TCHK 2.1                                                    Page 110
  7201.  
  7202.   
  7203.   Function             factorial - determines a factorial (n!)
  7204.   
  7205.   Syntax              double factorial(int n);
  7206.   
  7207.   Prototype in        mathhk.h
  7208.   
  7209.   Remarks             factorial returns n! (1*2*3*...*n). Traditionally
  7210.                       seen as a recursive function used to illustrate
  7211.                       recursion, factorial is done with a loop, using no
  7212.                       recursion.
  7213.   
  7214.   Return value        returns n factorial (n! = 1*2*3*...*n). If n <= 1,
  7215.                       factorial returns 1. If the result of n! is larger
  7216.                       than MAXDOUBLE (the largest value a double can
  7217.                       store, defined in Borland's LIMITS.H), factorial
  7218.                       return zero.
  7219.   
  7220.   See also            summation()
  7221.   
  7222.   Example             #include <mathhk.h>
  7223.   
  7224.                       main()
  7225.                       {
  7226.                            double f;
  7227.   
  7228.                            if ((f = factorial(13)) == 0)
  7229.                                 printf("Error computing 13!\n");
  7230.                            else
  7231.                                 printf("13! = %15.0lf\n",factorial(13));
  7232.                       }
  7233.   
  7234.   Program output      13! = 6227020800
  7235.   
  7236.   
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.      TCHK 2.1                                                    Page 111
  7267.  
  7268.   
  7269.   Function             fileexist - does a file exist
  7270.   
  7271.   Syntax              boolean fileexist(char *filename);
  7272.   
  7273.   Prototype in        filehk.h
  7274.   
  7275.   Remarks             checks if a file entry exists. The string filename
  7276.                       should be a standard DOS filename, with optional
  7277.                       drive and/or path. Files with hidden or system
  7278.                       attributes will not be found (searches are done via
  7279.                       findfirst() with 0 as an attribute byte).
  7280.   
  7281.                       Wildcards (*,?) are supported.
  7282.   
  7283.                       This function does not harm the dta. The dta is
  7284.                       modified by this function, but restored before
  7285.                       returning.
  7286.   
  7287.   Return value        returns TRUE if filename exists, FALSE if filename
  7288.                       does not exist. If an error occurs, FALSE will be
  7289.                       returned and Borland's variable errno will contain
  7290.                       the error code.
  7291.   
  7292.   See also            isdir()
  7293.   
  7294.   Example             #include <filehk.h>
  7295.   
  7296.                       main()
  7297.                       {
  7298.                            char fname[] = "a:\tchks.lib";
  7299.   
  7300.                            printf("%s is ",fname);
  7301.                            if (! fileexist(fname))
  7302.                                 printf("not ");
  7303.                            printf("found\n");
  7304.                       }
  7305.   
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.  
  7323.  
  7324.  
  7325.  
  7326.  
  7327.  
  7328.  
  7329.  
  7330.  
  7331.  
  7332.      TCHK 2.1                                                    Page 112
  7333.  
  7334.   
  7335.   Function             fname_match - compare filenames w/wildcards
  7336.   
  7337.   Syntax              int fname_match(char *fname1, char *fname2);
  7338.   
  7339.   Prototype in        filehk.h
  7340.   
  7341.   Remarks             compares filename fname1 to fname2 with wildcard
  7342.                       matching (*,?). Case is irrelevant.
  7343.   
  7344.   Return value        return a value
  7345.   
  7346.                            < 0  if fname1 is less than fname2
  7347.                            = 0  if fname1 is the same as fname2
  7348.                            > 0  if fname1 is greater than fname2
  7349.   
  7350.   Note                fname_match() compares strings just like DOS does
  7351.                       (or at least DOS 3.2, the one I work under.) Thus:
  7352.   
  7353.                            "STR*.*" = "str*.*"
  7354.                            "str.d*" = "StR.DZ"
  7355.                            "str" = "str.c"
  7356.   
  7357.                       Very little error checking is done. If an invalid
  7358.                       filename is passed (i.e. more than 12 characters
  7359.                       long) unpredictable results may occur.
  7360.   
  7361.   See also            fncmp()
  7362.   
  7363.   Example             #include <filehk.h>
  7364.   
  7365.                       main()
  7366.                       {
  7367.                            char a[12], b[12];
  7368.                            int cmp;
  7369.   
  7370.                            strcpy(a,"stringhk.c");
  7371.                            strcpy(b,"?TRI*");
  7372.                            printf("%s ",a);
  7373.                            if ((cmp = fname_match(a,b)) == 0)
  7374.                                 printf("=");
  7375.                            else if (cmp < 0)
  7376.                                      printf("<");
  7377.                                 else
  7378.                                      printf(">");
  7379.                            printf(" %s\n",b);
  7380.                       }
  7381.   
  7382.   Program output      stringhk.c = ?TRI*
  7383.   
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.  
  7392.  
  7393.  
  7394.  
  7395.  
  7396.  
  7397.  
  7398.      TCHK 2.1                                                    Page 113
  7399.  
  7400.   
  7401.   Function             fncmp - compare filenames w/wildcards
  7402.   
  7403.   Syntax              int fncmp(char *fname1, char *fname2);
  7404.   
  7405.   Prototype in        filehk.h
  7406.   
  7407.   Remarks             compares filename fname1 to fname2 with wildcard
  7408.                       matching (*,?). Case is irrelevant.
  7409.   
  7410.   Return value        return a value
  7411.   
  7412.                            < 0  if fname1 is less than fname2
  7413.                            = 0  if fname1 is the same as fname2
  7414.                            > 0  if fname1 is greater than fname2
  7415.   
  7416.                       In fact, if the value returned is 1 or -1, the
  7417.                       compare failed during the filename portion, and if
  7418.                       2 or -2 is returned, the compare failed during the
  7419.                       extension portion.
  7420.   
  7421.   Note                fncmp() compares strings just like DOS does (or at
  7422.                       least DOS 3.2, the one I work under.) Thus:
  7423.   
  7424.                            "STR*.*" = "str*.*"
  7425.                            "str.d*" = "StR.DZ"
  7426.                            "str" = "str.c"
  7427.   
  7428.                       Very little error checking is done. If an invalid
  7429.                       filename is passed (i.e. more than 12 characters
  7430.                       long) unpredictable results may occur.
  7431.   
  7432.   See also            fname_match()
  7433.   
  7434.   Example             #include <filehk.h>
  7435.   
  7436.                       main()
  7437.                       {
  7438.                            char a[12], b[12];
  7439.                            int cmp;
  7440.   
  7441.                            strcpy(a,"stringhk.c");
  7442.                            strcpy(b,"?TRI*.cc");
  7443.                            printf("%s ",a);
  7444.                            cmp = fncmp(a,b);
  7445.                            printf("Compare:  %s  %s   Yields: %d\n",
  7446.                                   a,b,cmp);
  7447.                       }
  7448.   
  7449.   Program output      Compare: stringhk.c  ?TRI*.cc   Yields: -2
  7450.   
  7451.  
  7452.  
  7453.  
  7454.  
  7455.  
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.  
  7462.  
  7463.  
  7464.      TCHK 2.1                                                    Page 114
  7465.  
  7466.   
  7467.   Function             frac - round the fractional portion of a real
  7468.   
  7469.   Syntax              double frac(double x);
  7470.   
  7471.   Prototype in        mathhk.h
  7472.   
  7473.   Remarks             frac will return the fractional portion of x.
  7474.   
  7475.   Return value        returns the fractional portion of x.
  7476.   
  7477.   See also            round()
  7478.   
  7479.   Example             #include <mathhk.h>
  7480.   
  7481.                       main()
  7482.                       {
  7483.                            printf("frac(%lf) = %lf\n",-2.307,
  7484.                                   frac(-2.307));
  7485.   
  7486.   Program output      frac(-2.307) = -0.307
  7487.   
  7488.   Example             see demonum.c
  7489.   
  7490.   
  7491.  
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.      TCHK 2.1                                                    Page 115
  7531.  
  7532.   
  7533.   Function             fsgn - sign of a real
  7534.   
  7535.   Syntax              #include <mathhk.h>
  7536.                       (int) fsgn(x)
  7537.   
  7538.   Prototype in        mathhk.h
  7539.   
  7540.   Remarks             fsgn will determine the sign of x. Zero is
  7541.                       considered positive.
  7542.   
  7543.                       This function is a macro.
  7544.   
  7545.                       The macro fsign() is defined as fsgn().
  7546.   
  7547.   Return value        returns -1 if x is negative, otherwise 1.
  7548.   
  7549.   See also            isgn(), lsgn()
  7550.   
  7551.   
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.  
  7563.  
  7564.  
  7565.  
  7566.  
  7567.  
  7568.  
  7569.  
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.      TCHK 2.1                                                    Page 116
  7597.  
  7598.   
  7599.   Function             fulltoddate - convert a full date to struct
  7600.   
  7601.   Syntax              struct ddate *fulltoddate(char *source);
  7602.   
  7603.   Prototype in        datehk.h
  7604.   
  7605.   Remarks             fulltoddate converts a date from a full date format
  7606.                       to the structure ddate format
  7607.   
  7608.   Return value        returns a pointer to the storage location
  7609.                       containing the date structure, or NULL if space
  7610.                       could not be allocated.
  7611.   
  7612.   See also            see Appendix A
  7613.                       Cal...(), date_convert(), ddatetofull(),
  7614.                       ddatetoshort(), ddatetostr(), Greg...(), Jul...(),
  7615.                       monthexpand(), shorttoddate(), strtoddate()
  7616.   
  7617.   Example             see demodate.c
  7618.   
  7619.  
  7620.  
  7621.  
  7622.  
  7623.  
  7624.  
  7625.  
  7626.  
  7627.  
  7628.  
  7629.  
  7630.  
  7631.  
  7632.  
  7633.  
  7634.  
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.      TCHK 2.1                                                    Page 117
  7663.  
  7664.   
  7665.   Function             FV - calculate the Future Value of a single
  7666.                       amount
  7667.   
  7668.   Syntax              double FV(double payment, double interest, int
  7669.                                 periods)
  7670.   
  7671.   Prototype in        finance.h
  7672.   
  7673.   Remarks             FV calculates the Future Value of a single amount
  7674.                       given the present value of the principal, the
  7675.                       interest rate per period and the number of periods.
  7676.   
  7677.   Return value        returns the future value of a single amount.
  7678.   
  7679.   See also            FVa(), PMT(), PV(), PVa()
  7680.   
  7681.   
  7682.  
  7683.  
  7684.  
  7685.  
  7686.  
  7687.  
  7688.  
  7689.  
  7690.  
  7691.  
  7692.  
  7693.  
  7694.  
  7695.  
  7696.  
  7697.  
  7698.  
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.      TCHK 2.1                                                    Page 118
  7729.  
  7730.   
  7731.   Function             FVa - calculate the Future Value of an annuity
  7732.   
  7733.   Syntax              double FVa(double payment, double interest, int
  7734.                                  periods)
  7735.   
  7736.   Prototype in        finance.h
  7737.   
  7738.   Remarks             FVa calculates the Future Value of an annuity given
  7739.                       the amount of each payment, the interest rate per
  7740.                       period and the number of periods.
  7741.   
  7742.   Return value        returns the future value of an annuity.
  7743.   
  7744.   See also            FV(), PMT(), PV(), PVa()
  7745.   
  7746.   
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754.  
  7755.  
  7756.  
  7757.  
  7758.  
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.      TCHK 2.1                                                    Page 119
  7795.  
  7796.   
  7797.   Function             getAssignmemseg - get ASSIGN work area segment
  7798.   
  7799.   Syntax              unsigned getAssignmemseg(void);
  7800.   
  7801.   Prototype in        doshk.h
  7802.   
  7803.   Remarks             gets the segment of the ASSIGN work are.
  7804.   
  7805.   Return value        returns the segment of the ASSIGN work area.
  7806.   
  7807.   See also            isAssignavail()
  7808.   
  7809.   
  7810.  
  7811.  
  7812.  
  7813.  
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.      TCHK 2.1                                                    Page 120
  7861.  
  7862.   
  7863.   Function             getBootBlock - get Boot Block
  7864.   
  7865.   Syntax              boolean getBootBlock(int drive, struct BootBlock
  7866.                                            *BB)
  7867.   
  7868.   Prototype in        doshk.h
  7869.   
  7870.   Remarks             gets the Boot Block for the disk determined by
  7871.                       drive, where 0=A, 1=B, etc. BB must be a pointer to
  7872.                       an allocated piece of memory.
  7873.   
  7874.   Return value        returns TRUE if successful, otherwise returns FALSE
  7875.                       with the DOS error code in the global variable
  7876.                       errno.
  7877.   
  7878.   See also            getBootBlock4(), getBPB()
  7879.   
  7880.   Example             #include <doshk.h>
  7881.   
  7882.                       main()
  7883.                       {
  7884.                            struct BootBlock BB;
  7885.   
  7886.                            if (getBootBlock(0,&BPB))
  7887.                                 printf("Got it");
  7888.                            else
  7889.                                 printf("Error");
  7890.                       }
  7891.   
  7892.   
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.      TCHK 2.1                                                    Page 121
  7927.  
  7928.   
  7929.   Function             getBootBlock4 - get Boot Block under DOS 4.x.
  7930.   
  7931.   Syntax              boolean getBootBlock4(int drive, struct BootBlock4
  7932.                                            *BB4)
  7933.   
  7934.   Prototype in        doshk.h
  7935.   
  7936.   Remarks             gets the Boot Block for the disk determined by
  7937.                       drive, where 0=A, 1=B, etc. BB must be a pointer to
  7938.                       an allocated piece of memory. This function only
  7939.                       works for DOS versions 4.x and later.
  7940.   
  7941.   Return value        returns TRUE if successful, otherwise returns FALSE
  7942.                       with the DOS error code in the global variable
  7943.                       errno.
  7944.   
  7945.   See also            getBootBlock(), getBPB(), getVolSerialNum()
  7946.   
  7947.   Example             #include <doshk.h>
  7948.   
  7949.                       main()
  7950.                       {
  7951.                            struct BootBlock4 BB4;
  7952.   
  7953.                            if (getBootBlock4(0,&BPB4))
  7954.                                 printf("Got it");
  7955.                            else
  7956.                                 printf("Error");
  7957.                       }
  7958.   
  7959.   
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.      TCHK 2.1                                                    Page 122
  7993.  
  7994.   
  7995.   Function             getBPB - get Bios Parameter Block
  7996.   
  7997.   Syntax              boolean getBPB(int drive, struct BIOSParmBlock
  7998.                                      *BPB);
  7999.   
  8000.   Prototype in        doshk.h
  8001.   
  8002.   Remarks             gets the Bios Parameter Block for the disk
  8003.                       determined by drive, where 0=A, 1=B, etc. BPB must
  8004.                       be a pointer to an allocated piece of memory.
  8005.   
  8006.   Return value        returns TRUE if successful, otherwise returns FALSE
  8007.                       with the DOS error code in the global variable
  8008.                       errno.
  8009.   
  8010.   See also            getBootBlock(), getBootBlock4()
  8011.   
  8012.   Example             #include <doshk.h>
  8013.   
  8014.                       main()
  8015.                       {
  8016.                            struct BIOSParmBlock BPB;
  8017.   
  8018.                            if (getBPB(0,&BPB))
  8019.                                 printf("Got it");
  8020.                            else
  8021.                                 printf("Error");
  8022.                       }
  8023.   
  8024.   
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.      TCHK 2.1                                                    Page 123
  8059.  
  8060.   
  8061.   Function             getc_match - get specific input, case dependent
  8062.   
  8063.   Syntax              char getc_match(boolean output, char *match);
  8064.   
  8065.   Prototype in        keyboard.h
  8066.   
  8067.   Remarks             getc_match accepts character input (via getk())
  8068.                       until one of the characters in the string match in
  8069.                       entered, case dependent ('a' != 'A'). Extended keys
  8070.                       never match (F10 will never be a match.) If output
  8071.                       = TRUE, the character is echoed to the screen via
  8072.                       putk().
  8073.   
  8074.   Return value        returns the key pressed.
  8075.   
  8076.   See also            getc_match(), getk(), getlogical(), getyn()
  8077.   
  8078.   Example             #include <keyboard.h>
  8079.   
  8080.                       main()
  8081.                       {
  8082.                            printf("Enter your choice (abcdHJ): ");
  8083.                            getc_match(1,"abcdHJ");
  8084.                       }
  8085.   
  8086.   Program output      Enter your choice (abcdHJ): H
  8087.   
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.      TCHK 2.1                                                    Page 124
  8125.  
  8126.   
  8127.   Function             getci_match - get specific input, case
  8128.                                       independent
  8129.   
  8130.   Syntax              char getci_match(boolean output, char *match);
  8131.   
  8132.   Prototype in        keyboard.h
  8133.   
  8134.   Remarks             getci_match accepts character input (via getk())
  8135.                       until one of the characters in the string match in
  8136.                       entered, case independent ('a' == 'A'). Extended
  8137.                       keys never match (F10 will never be a match.) If
  8138.                       output = TRUE, the character is echoed to the
  8139.                       screen via putch().
  8140.   
  8141.   Return value        returns the key pressed.
  8142.   
  8143.   See also            getc_match(), getk(), getlogical(), getyn()
  8144.   
  8145.   Example             #include <keyboard.h>
  8146.   
  8147.                       main()
  8148.                       {
  8149.                            printf("Enter your choice (Q, X, F, D): ");
  8150.                            getci_match(1,"QXFD");
  8151.                       }
  8152.   
  8153.   Program output      Enter your choice (Q, X, F, D): f
  8154.   
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.  
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.      TCHK 2.1                                                    Page 125
  8191.  
  8192.   
  8193.   Function             getcursor - gets cursor scan lines
  8194.   
  8195.   Syntax              unsigned int getcursor(void);
  8196.   
  8197.   Prototype in        video.h
  8198.   
  8199.   Remarks             gets the cursor scan lines via INT 0x10, Function
  8200.                       3.
  8201.   
  8202.   Return value        returns the scan lines of the cursor, with the
  8203.                       starting scan line in the high order byte and the
  8204.                       ending scan line in the low order byte.
  8205.   
  8206.   See also            cursor_blink(), cursor_flip(), cursor_off(),
  8207.                       cursor_on(), read_cursor(), set_cursor(),
  8208.                       setcursor()
  8209.   
  8210.   
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.      TCHK 2.1                                                    Page 126
  8257.  
  8258.   
  8259.   Function             getdatehk - inputs a date from the keyboard
  8260.   
  8261.   Syntax              char *getdatehk(void);
  8262.   
  8263.   Prototype in        keyboard.h
  8264.   
  8265.   Remarks             getdatehk inputs a date from the keyboard in the
  8266.                       form xx-xx-xx. Only digits, space and backspace are
  8267.                       valid input. Input is terminated when the ENTER key
  8268.                       is pressed. Video output is via Borland's console
  8269.                       i/o.
  8270.   
  8271.   Return value        if a valid date is entered, getdatehk returns a
  8272.                       string in the form xx-xx-xx, otherwise NULL is
  8273.                       returned.
  8274.   
  8275.   Example             #include <keyboard.h>
  8276.                       #include <stdio.h>
  8277.                       main()
  8278.                       {
  8279.                            char *c;
  8280.   
  8281.                            printf("What is today's date: ");
  8282.                            if ((c = getdatehk()) != NULL)
  8283.                                 printf("Today is %s\n",c);
  8284.                       }
  8285.   
  8286.   Program output      What is today's date: 11-10-87
  8287.                       Today is 11-10-87
  8288.   
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294.  
  8295.  
  8296.  
  8297.  
  8298.  
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.      TCHK 2.1                                                    Page 127
  8323.  
  8324.   
  8325.   Function             getdouble - inputs a double from the keyboard
  8326.   
  8327.   Syntax              char *getdouble(void);
  8328.   
  8329.   Prototype in        keyboard.h
  8330.   
  8331.   Remarks             getdouble inputs a double from the keyboard. Only
  8332.                       digits, decimal point, leading sign and backspace
  8333.                       are valid input. Input is terminated when the ENTER
  8334.                       key is pressed. Video output is via Borland's
  8335.                       console i/o.
  8336.   
  8337.                       The maximum length of input is 25.
  8338.   
  8339.   Return value        returns a string of the format     [sn] [ddd] [.]
  8340.                       [ddd] where
  8341.   
  8342.                            [sn]  = optional sign (+ or -)
  8343.                            [ddd] = optional digits
  8344.                            [.]   = optional decimal point
  8345.   
  8346.   See also            getint(), getreal()
  8347.   
  8348.   Example             #include <keyboard.h>
  8349.                       #include <stdio.h>
  8350.                       main()
  8351.                       {
  8352.                            char *c;
  8353.   
  8354.                            printf("Give me a double: ");
  8355.                            c = getdouble();
  8356.                            printf("Your input is %s\n",c);
  8357.                       }
  8358.   
  8359.   Program output      Give me a double: -1289.12003
  8360.                       Your input is -1289.12003
  8361.   
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.      TCHK 2.1                                                    Page 128
  8389.  
  8390.   
  8391.   Function             getfilespec - get a DIR proper filespec
  8392.   
  8393.   Syntax              char *getfilespec(char *s);
  8394.   
  8395.   Prototype in        filehk.h
  8396.   
  8397.   Remarks             getfilespec parses a string pointed to by s for a
  8398.                       file name. Any drive and path information is
  8399.                       stripped from the string and the filename.ext is
  8400.                       expanded with wildcards, as DIR does internally
  8401.                       (i.e. c:tchk.lib has a filename.ext of tchk.lib amd
  8402.                       c:tchk. has a filenameext of tchk., but c:tchk has
  8403.                       a filename.ext of tchk.*). The original string s is
  8404.                       modified.
  8405.   
  8406.                       getfilespec() relies on parsefilename() to strip
  8407.                       any drive and path information from s. Thus, any
  8408.                       restrictions applying to parsefilename() also apply
  8409.                       to getfilespec().
  8410.   
  8411.   Return value        returns a pointer to s.
  8412.   
  8413.   See also            parsefilename(), parsefnameext(), resolvepath()
  8414.   
  8415.   Example             see demopars.c
  8416.   
  8417.   
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.      TCHK 2.1                                                    Page 129
  8455.  
  8456.   
  8457.   Function             getfname - get a filename from the keyboard
  8458.   
  8459.   Syntax              int getfname(byte row, byte col, char *returnstr,
  8460.                                    char *pattern, int argn, int argk[],
  8461.                                    char flags);
  8462.   
  8463.   Prototype in        video.h
  8464.   
  8465.   Remarks             getfname calls getget() asking for input of a
  8466.                       length 12 string, at the coordinates (col,row),
  8467.                       including pattern formatting and optional input
  8468.                       exit keys listed in argk. If memory was allocated
  8469.                       for returnstr, the string pointed to by returnstr
  8470.                       is checked to see if it is a valid DOS filename. A
  8471.                       valid filename must be of the form
  8472.                            [filename] [.] [ext]    and does not contain
  8473.                       any of the following:
  8474.   
  8475.                            [ ] ; , . / ? * : " + = - < > \ |
  8476.   
  8477.                       If memory could not be allocated for the string,
  8478.                       returnstr will be set to NULL.
  8479.   
  8480.                       For more info on pattern and argk requirements,
  8481.                       check the stats for getget().
  8482.   
  8483.   Return value        if memory could not be allocated for returnstr or
  8484.                       the string pointed to by returnstr is not a valid
  8485.                       filename, -1 is returned, otherwise the key used to
  8486.                       exit the input is returned.
  8487.   
  8488.   See also            getget()
  8489.   
  8490.   Example             #include <filehk.h>
  8491.                       #include <keycode.h>
  8492.   
  8493.                       main()
  8494.                       {
  8495.                            char *fname;
  8496.                            int keys[2]={ESC,F10};   /* ESC & F10 exit
  8497.                            input */
  8498.   
  8499.                            gotoxy(0,0);
  8500.                            printf("Enter file: ");
  8501.                            if (getfname(0,13,fname,"!",2,keys) == -1)
  8502.                                 printf("    BAD FILENAME");
  8503.                            else
  8504.                                 printf("    valid filename");
  8505.                       }
  8506.   
  8507.   Program output      
  8508.   
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.      TCHK 2.1                                                    Page 130
  8521.  
  8522.   
  8523.   Function             getget - get a string from the keyboard w/editing
  8524.   
  8525.   Syntax              int getget(int col, int row, char *returnstr,
  8526.                                  int size, char *pattern, int argn,
  8527.                                  int argk[], unsigned flags);
  8528.   
  8529.   Prototype in        keyboard.h
  8530.   
  8531.   Remarks             getget inputs a string at coordinates (col,row), of
  8532.                       maximum length size, formatted according to
  8533.                       pattern. Input ends when ENTER or one of the scan
  8534.                       codes specified in argk[] in inputted. There are
  8535.                       argn number of elements in argk[]. The string is
  8536.                       returned in returnstr and the function returns the
  8537.                       key code of the exiting key.
  8538.   
  8539.                       Full feature editing of the string includes:
  8540.   
  8541.                            Enter          Ends input, exits function
  8542.                            Backspace      normal backspace
  8543.                            Insert         toggle inset/overwrite mode
  8544.                            Delete         delete character under cursor
  8545.                            Left Arrow     move cursor back 1 character
  8546.                            Right Arrow    move cursor forward 1 character
  8547.                            Home           move cursor to beginning of
  8548.                                           string
  8549.                            End            move cursor to end of string
  8550.                            Ctrl-Y         delete entire string
  8551.                            Alt-Y          delete string from cursor to
  8552.                                           end
  8553.                            Ctrl-Right     move cursor to beginning of
  8554.                                           next word
  8555.                            Ctrl-Left      move cursor to beginning of
  8556.                                           previous word
  8557.                            Alt-U          undo editing - restore initial
  8558.                                           string
  8559.   
  8560.                       Here are the valid patterns:
  8561.   
  8562.                                  pattern     format
  8563.                                  -------     ------
  8564.                       Types          a       Alphabetic
  8565.                                      A       Alphabetic and capitalized
  8566.                                      D or d  Date
  8567.                                      f       DOS Filename
  8568.                                      F       DOS Filename and capitalized
  8569.                                      h       Hexadecimal
  8570.                                      H       Hexadecimal and capitalized
  8571.                                      n       Alphanumeric
  8572.                                      N       Alphanumeric and capitalized
  8573.                                      p       DOS Pathname
  8574.                                      P       DOS Pathname and capitalized
  8575.                                      X       Ascii (default)
  8576.   
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.      TCHK 2.1                                                    Page 131
  8587.  
  8588.                                      9       Numeric
  8589.                                      #       Numeric and punctuation
  8590.   
  8591.                       Modifiers      !       convert to upper case
  8592.                                      .       punctuation
  8593.   
  8594.                       The flags modifier is a bit field of flags, as
  8595.                       follows:
  8596.   
  8597.                            xxxxxxxx UDJJBLRI        where
  8598.   
  8599.                            U  = call _idle_get() after keyboard input
  8600.                            D  = free time slices under DESQview
  8601.                            JJ = Justify (left, right, center)
  8602.                            B  = Bell
  8603.                            L  = trim Left side on exit
  8604.                            R  = trim Right side on exit
  8605.                            I  = start edit in Insert mode (as opposed
  8606.                                 to Overwrite mode)
  8607.   
  8608.                       Input is done via the inkeydv() function if the
  8609.                       DESQview free time slices flag is set, otherwise
  8610.                       inkey().
  8611.   
  8612.                       After input is polled, if the user defined function
  8613.                       flag is set (UDFIDLE) the function _idle_get is
  8614.                       called. Currently, the definition of _idle_get is:
  8615.   
  8616.                                 int _idle_get(void)
  8617.   
  8618.                       Possible uses for such a function is an onscreen
  8619.                       clock, printing, or some other background task. In
  8620.                       the future _idle_get() will receive releveant
  8621.                       parameters from getget(). To define _idle_get as
  8622.                       the user defined function int myfunction(void),
  8623.                       try:
  8624.   
  8625.                            _idle_get = (far *)myfunction;
  8626.   
  8627.                       The full definition for _idle_get() is:
  8628.   
  8629.                            int (far *_idle_get)(void);
  8630.   
  8631.                       You should declare myfunction() as type int, with
  8632.                       void parameters, and you should typecast the
  8633.                       function as a far pointer when you assign it to
  8634.                       _idle_get.
  8635.   
  8636.                       Cursor sizes are determined via the global
  8637.                       variables _cursorinsert and _cursoroverwrite.
  8638.   
  8639.                       Video output is via Borland's console i/o.
  8640.   
  8641.   
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.      TCHK 2.1                                                    Page 132
  8653.  
  8654.   Return value        returns the key code of the key causing the exit
  8655.   
  8656.   See also            getstr(), inkey(), inkeydv()
  8657.   
  8658.   
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.  
  8672.  
  8673.  
  8674.  
  8675.  
  8676.  
  8677.  
  8678.  
  8679.  
  8680.  
  8681.  
  8682.  
  8683.  
  8684.  
  8685.  
  8686.  
  8687.  
  8688.  
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.      TCHK 2.1                                                    Page 133
  8719.  
  8720.   
  8721.   Function             getint - inputs an integer from the keyboard
  8722.   
  8723.   Syntax              char *getint(void);
  8724.   
  8725.   Prototype in        keyboard.h
  8726.   
  8727.   Remarks             getint inputs an integer from the keyboard. Only
  8728.                       digits, leading sign and backspace are valid input.
  8729.                       Input is terminated when the ENTER key is pressed.
  8730.   
  8731.                       the maximum length of input is 25.
  8732.   
  8733.                       Video output is via Borland's console i/o.
  8734.   
  8735.   Return value        returns a string of the format  [sn] [ddd]  where
  8736.   
  8737.                            [sn]  = optional sign (+ or -)
  8738.                            [ddd] = optional digits
  8739.   
  8740.   See also            getdouble(), getreal()
  8741.   
  8742.   Example             #include <keyboard.h>
  8743.                       #include <stdio.h>
  8744.                       main()
  8745.                       {
  8746.                            char *c;
  8747.   
  8748.                            printf("Give me an integer: ");
  8749.                            c = getint();
  8750.                            printf("Your input is %s\n",c);
  8751.                       }
  8752.   
  8753.   Program output      Give me an integer: -1289
  8754.                       Your input is -1289
  8755.   
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.  
  8765.  
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.      TCHK 2.1                                                    Page 134
  8785.  
  8786.   
  8787.   Function             getk - get a key
  8788.   
  8789.   Syntax              byte getk(boolean wait);
  8790.   
  8791.   Prototype in        keyboard.h
  8792.   
  8793.   Remarks             getk returns the ascii code of the key pressed. If
  8794.                       no key was pressed (WAIT = FALSE) zero is returned.
  8795.                       This function is similar to getchar() except input
  8796.                       is not echoed to the screen and getk will detect
  8797.                       any key press (any standard keypress. It cannot
  8798.                       distinguish between the grey '+' key and the white
  8799.                       '+'. This function is interrupt driven. It will
  8800.                       detect ALT combinations, Del, PgUp, function keys,
  8801.                       etc., any keyboard INTerrupt accepted keys.)
  8802.   
  8803.   Return value        returns the ascii code for the key pressed, from 1
  8804.                       to 255. If WAIT = FALSE, and no key is pressed,
  8805.                       zero is returned. Check the global variables
  8806.                       key_status and key_extended to determine the shift
  8807.                       key status and if the key is an extended one.
  8808.   
  8809.   See also            keycode.h
  8810.                       getc_match(), getc_match(), getlogical(), getyn(),
  8811.                       inkey(), inkeyc()
  8812.   
  8813.   Example             #include <keyboard.h>
  8814.                       #include <stdio.h>
  8815.   
  8816.                       main()
  8817.                       {
  8818.                            extern boolean key_extended;
  8819.                            byte c;
  8820.   
  8821.                            c = getk(WAIT);
  8822.                            printf("Key code # in keycode.h: %d\n",
  8823.                                 key_extended ? c+256 : c);
  8824.                       }
  8825.   
  8826.   
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.  
  8850.      TCHK 2.1                                                    Page 135
  8851.  
  8852.   
  8853.   Function             getlogical - get Yes/No
  8854.   
  8855.   Syntax              char getlogical(int output);
  8856.   
  8857.   Prototype in        keyboard.h
  8858.   
  8859.   Remarks             getlogical waits for a True/False key (TtFfYyNn) to
  8860.                       be pressed and then displays a message via putstr()
  8861.                       according to output:
  8862.   
  8863.                            output         Message displayed
  8864.                            ------         -----------------
  8865.                              0                 no message
  8866.                              1                 T or F or Y or N
  8867.                              2                 True or False or Yes or No
  8868.   
  8869.                       getlogical is case independent.
  8870.   
  8871.                       Video output is via Borland's console i/o.
  8872.   
  8873.   Return value        returns 'Y' or 'N'
  8874.   
  8875.   See also            getc_match(), getci_match(), getk(), getyn(),
  8876.                       inkey(), inkeyc()
  8877.   
  8878.   Example             #include <keyboard.h>
  8879.   
  8880.                       main()
  8881.                       {
  8882.                            printf("This is good? ");
  8883.                            getlogical(2);
  8884.                       }
  8885.   
  8886.   
  8887.  
  8888.  
  8889.  
  8890.  
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.  
  8909.  
  8910.  
  8911.  
  8912.  
  8913.  
  8914.  
  8915.  
  8916.      TCHK 2.1                                                    Page 136
  8917.  
  8918.   
  8919.   Function             getpw - inputs a password from the keyboard
  8920.   
  8921.   Syntax              boolean getpw(int size, char *pw, char c);
  8922.   
  8923.   Prototype in        keyboard.h
  8924.   
  8925.   Remarks             inputs a string of maximum length size. Instead of
  8926.                       displaying the character input the character c is
  8927.                       displayed. The string input is stored in the memory
  8928.                       pointed to by pw. Make sure pw points to an
  8929.                       allocated piece of memory large enough to hold the
  8930.                       input string or unpredictable results may occur.
  8931.   
  8932.                       This function is useful for inputting passwords.
  8933.                       Only printable characters (those passing the
  8934.                       isprint() test), ENTER, ESC and Backspace are
  8935.                       acceptable input. All other input is ignored.
  8936.   
  8937.                       Video output is via Borland's console i/o.
  8938.   
  8939.   Return value        returns TRUE if ENTER terminated the input, FALSE
  8940.                       if ESC terminated the input.
  8941.   
  8942.   See also            getget()
  8943.   
  8944.   
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.  
  8981.  
  8982.      TCHK 2.1                                                    Page 137
  8983.  
  8984.   
  8985.   Function             getreal - inputs a real from the keyboard
  8986.   
  8987.   Syntax              char *getreal(int size, int decimal);
  8988.   
  8989.   Prototype in        keyboard.h
  8990.   
  8991.   Remarks             getreal inputs a real (double) from the keyboard.
  8992.                       Only digits, decimal place, leading sign and
  8993.                       backspace are valid input. Input is terminated when
  8994.                       the ENTER key is pressed.
  8995.   
  8996.                       the maximum length of input is size and the maximum
  8997.                       number of decimal places is decimal. When
  8998.                       calculating size, you must leave enough room for
  8999.                       decimal, plus the number of places of the leading
  9000.                       integer, one for the decimal point and one for the
  9001.                       leading sign.
  9002.   
  9003.                       Video output is via Borland's console i/o.
  9004.   
  9005.   Return value        returns a string of the format  [sn] [ddd] [.]
  9006.                       [ddd] where
  9007.   
  9008.                            [sn]  = optional sign (+ or -)
  9009.                            [ddd] = optional digits
  9010.                            [.]   = optional decimal point
  9011.   
  9012.   See also            getdouble(), getint()
  9013.   
  9014.   Example             #include <keyboard.h>
  9015.                       #include <stdio.h>
  9016.                       main()
  9017.                       {
  9018.                            char *c;
  9019.   
  9020.                            printf("Give me a real: ");
  9021.                            c = getreal(8,2);
  9022.                            printf("Your input is %s\n",c);
  9023.                       }
  9024.   
  9025.   Program output      Give me a real: -1012.30
  9026.                       Your input is -1012.30
  9027.   
  9028.  
  9029.  
  9030.  
  9031.  
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.  
  9047.  
  9048.      TCHK 2.1                                                    Page 138
  9049.  
  9050.   
  9051.   Function             getstr - input a string from the keyboard
  9052.   
  9053.   Syntax              char *getstr(int size, char *pattern);
  9054.   
  9055.   Prototype in        keyboard.h
  9056.   
  9057.   Remarks             getstr inputs a string from the keyboard, of
  9058.                       maximum length size, given a format pattern. See
  9059.                       getget() for a list of format modifiers.
  9060.                       The only other valid keys are backspace and ENTER.
  9061.   
  9062.                       Video output is via Borland's console i/o.
  9063.   
  9064.   Return value        returns a pointer to the storage location
  9065.                       containing the formatted string, or NULL if space
  9066.                       could not be allocated.
  9067.   
  9068.   See also            getget()
  9069.   
  9070.   Example             #include <keyboard.h>
  9071.                       #include <stdio.h>
  9072.   
  9073.                       main()
  9074.                       {
  9075.                            char *f, *l, *s, *c;
  9076.   
  9077.                            printf("First name: ");
  9078.                            f = getget(10,"A");
  9079.                            printf("Last name: ");
  9080.                            l = getget(20,"a");
  9081.                            printf("SS#: ");
  9082.                            s = getget(8,"9");
  9083.                            printf("Comments: ");
  9084.                            c = getget(60,"");
  9085.                       }
  9086.   
  9087.   Program output      First name: HOWARD
  9088.                       Last name: kapustein
  9089.                       SS#: 123456789
  9090.                       Comments: The empty quotes defaults to X.
  9091.   
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.      TCHK 2.1                                                    Page 139
  9115.  
  9116.   
  9117.   Function             GetTypePointDevice - Pointing Device BIOS
  9118.                                              Interface: Get Device Id
  9119.   
  9120.   Syntax              int GetTypePointDevice(void);
  9121.   
  9122.   Prototype in        ibm.h
  9123.   
  9124.   Remarks             GetTypePointDevice() will get the device id of the
  9125.                       pointing device.
  9126.   
  9127.   Return value        returns the device id on success and -1 on failure.
  9128.                       The success code is stored in Borland's global
  9129.                       variable errno. Here are the possible error values:
  9130.   
  9131.                            0x00      Success
  9132.                            0x01      Invalid function
  9133.                            0x02      Invalid input
  9134.                            0x03      Interface error
  9135.                            0x04      Need to resend
  9136.                            0x05      No device handler installed
  9137.   
  9138.                       Because the device id is returned, you should cross
  9139.                       check any returned value of -1 with errno to insure
  9140.                       the function did fail. Only if -1 is returned AND
  9141.                       errno != 0 did the function fail.
  9142.   
  9143.   Note                This function is only available on PS/2 machines or
  9144.                       under DESQview 2.x.
  9145.   
  9146.   See also            ResetPointDevice(), SetPointDevice(),
  9147.                       SetRatePointDevice(), SetResPointDevice()
  9148.   
  9149.   
  9150.  
  9151.  
  9152.  
  9153.  
  9154.  
  9155.  
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.  
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.      TCHK 2.1                                                    Page 140
  9181.  
  9182.   
  9183.   Function             getVolSerialNum - get Volume Serial Number
  9184.                                           (DOS 4.x)
  9185.   
  9186.   Syntax              boolean getVolSerialNum(int drive, unsigned long
  9187.                                               *serialnum);
  9188.   
  9189.   Prototype in        doshk.h
  9190.   
  9191.   Remarks             gets the Volume Serial Number for a disk determined
  9192.                       by drive, where 0=A, 1=B, etc. serialnum must be a
  9193.                       pointer to an allocated piece of memory. This
  9194.                       function only works for DOS versions 4.x and later.
  9195.   
  9196.   Return value        returns TRUE if successful, otherwise returns FALSE
  9197.                       with the DOS error code in the global variable
  9198.                       errno.
  9199.   
  9200.   See also            getBootBlock(), getBootBlock4(), getBPB()
  9201.   
  9202.   Example             #include <doshk.h>
  9203.   
  9204.                       main()
  9205.                       {
  9206.                            unsigned long serialnum;
  9207.   
  9208.                            if (getVolSerialNum(&serialnum))
  9209.                                 printf("Got it: %lu",serialnum);
  9210.                            else
  9211.                                 printf("Error");
  9212.                       }
  9213.   
  9214.   
  9215.  
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.  
  9223.  
  9224.  
  9225.  
  9226.  
  9227.  
  9228.  
  9229.  
  9230.  
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.      TCHK 2.1                                                    Page 141
  9247.  
  9248.   
  9249.   Function             getyn - get Yes/No
  9250.   
  9251.   Syntax              char getyn(int output);
  9252.   
  9253.   Prototype in        keyboard.h
  9254.   
  9255.   Remarks             getyn waits for a Y or N to be pressed and then
  9256.                       displays a message via putstr() according to
  9257.                       output:
  9258.   
  9259.                            output         Message displayed
  9260.                            ------         -----------------
  9261.                              0                 no message
  9262.                              1                 Y or N
  9263.                              2                 Yes or No
  9264.   
  9265.                       getyn is case independent.
  9266.   
  9267.                       Video output is via Borland's console i/o.
  9268.   
  9269.   Return value        returns 'Y' or 'N'
  9270.   
  9271.   See also            getc_match(), getk(), getc_match(), getlogical(),
  9272.                       inkey(), inkeyc()
  9273.   
  9274.   Example             #include <keyboard.h>
  9275.   
  9276.                       main()
  9277.                       {
  9278.                            printf("Is this OK? ");
  9279.                            getyn(2);
  9280.                       }
  9281.   
  9282.   
  9283.  
  9284.  
  9285.  
  9286.  
  9287.  
  9288.  
  9289.  
  9290.  
  9291.  
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.      TCHK 2.1                                                    Page 142
  9313.  
  9314.   
  9315.   Function             gotohv - move cursor to absolute coordinates
  9316.   
  9317.   Syntax              void gotohv(int h, int v);
  9318.   
  9319.   Prototype in        video.h
  9320.   
  9321.   Remarks             gotoxy puts cursor at absolute screen coordinates
  9322.                       (h,v) via INT 0x10, Service 2. The top left corner
  9323.                       of the screen is referred to by (0,0).
  9324.   
  9325.                       This is NOT the same as Borland's gotoxy().
  9326.                       Borland's function is affected by the window()
  9327.                       settings, whereas gotohv() is not.
  9328.   
  9329.   Return value        nothing.
  9330.   
  9331.   See also            read_cursor(), whereh(), wherev()
  9332.   
  9333.   Example             #include <video.h>
  9334.   
  9335.                       main()
  9336.                       {
  9337.                            gotohv(0,0);
  9338.                       }
  9339.   
  9340.   
  9341.  
  9342.  
  9343.  
  9344.  
  9345.  
  9346.  
  9347.  
  9348.  
  9349.  
  9350.  
  9351.  
  9352.  
  9353.  
  9354.  
  9355.  
  9356.  
  9357.  
  9358.  
  9359.  
  9360.  
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.      TCHK 2.1                                                    Page 143
  9379.  
  9380.   
  9381.   Function             Greg... - family of Gregorian date conversion
  9382.                                   functions
  9383.   
  9384.   Syntax              double GregtoCal(char *greg);
  9385.                       double GregtoCalCent(char *greg);
  9386.   
  9387.                       double GregEurotoCal(char *greg);
  9388.                       double GregEurotoCalCent(char *greg);
  9389.   
  9390.                       double GregJaptoCal(char *greg);
  9391.                       double GregJaptoCalCent(char *greg);
  9392.   
  9393.   Prototype in        datehk.h
  9394.   
  9395.   Remarks             GregtoCal      converts Gregorian (US) dates to
  9396.                                      Calendar dates
  9397.                       GregtoCalCent       converts Gregorian (US) dates
  9398.                                           to Calendar dates (w/century)
  9399.   
  9400.                       GregEurotoCal       converts Gregorian (European)
  9401.                                           dates to Calendar dates
  9402.                       GregEurotoCalCent   converts Gregorian (European)
  9403.                                           dates to Calendar dates
  9404.                                           (w/century)
  9405.   
  9406.                       GregJaptoCal        converts Gregorian (Japan)
  9407.                                           dates to Calendar dates
  9408.                       GregJaptoCalCent    converts Gregorian (Japan)
  9409.                                           dates to Calendar dates
  9410.                                           (w/century)
  9411.   
  9412.   Return value        GregtoCal, GregEurotoCal, GregJaptoCal return a
  9413.                            Calendar date
  9414.                       GregtoCalCent, GregEurotoCalCent, GregJaptoCalCent
  9415.                            return a Calendar date (w/century)
  9416.   
  9417.   See also            Appendix A
  9418.                       Cal...(), date_convert(), ddatetofull(),
  9419.                       ddatetoshort(), ddatetostr(), fulltoddate(),
  9420.                       Jul...(), monthexpand(), shorttoddate(),
  9421.                       strtoddate()
  9422.   
  9423.   Example             see demodate.c
  9424.   
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.  
  9440.  
  9441.  
  9442.  
  9443.  
  9444.      TCHK 2.1                                                    Page 144
  9445.  
  9446.   
  9447.   Function             horiz_line - draw a horizontal line
  9448.   
  9449.   Syntax              void horiz_line(byte c, int len, int col, int row);
  9450.   
  9451.   Prototype in        video.h
  9452.   
  9453.   Remarks             draws a horizontal line of characters c of length
  9454.                       len beginning at (col,row) via INTerrupts, using
  9455.                       the current char_attribute setting for color.
  9456.                       Screen coordinates are absolute.
  9457.   
  9458.                       horiz_line does no error checking on the passed
  9459.                       parameters.
  9460.   
  9461.   Return value        nothing.
  9462.   
  9463.   See also            box(), vert_line()
  9464.   
  9465.   Example             #include <video.h>
  9466.   
  9467.                       main()
  9468.                       {
  9469.                            horiz_line('*',7,4,4);   /* draw 7 *'s */
  9470.                       }
  9471.   
  9472.   
  9473.  
  9474.  
  9475.  
  9476.  
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.  
  9499.  
  9500.  
  9501.  
  9502.  
  9503.  
  9504.  
  9505.  
  9506.  
  9507.  
  9508.  
  9509.  
  9510.      TCHK 2.1                                                    Page 145
  9511.  
  9512.   
  9513.   Function             initkeyvars - setup internal keyboard settings
  9514.   
  9515.   Syntax              void initkeyvars(void);
  9516.   
  9517.   Prototype in        keyboard.h
  9518.   
  9519.   Remarks             used to initialize internal variables used by
  9520.                       several keyboard functions. The following variable
  9521.                       assignments are made:
  9522.   
  9523.                            _cursorinsert = CURSOR_HALFBLOCK;
  9524.                            _cursoroverwrite = CURSOR_UNDERBAR;
  9525.   
  9526.   Return value        nothing.
  9527.   
  9528.   See also            getget()
  9529.   
  9530.   
  9531.  
  9532.  
  9533.  
  9534.  
  9535.  
  9536.  
  9537.  
  9538.  
  9539.  
  9540.  
  9541.  
  9542.  
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.  
  9558.  
  9559.  
  9560.  
  9561.  
  9562.  
  9563.  
  9564.  
  9565.  
  9566.  
  9567.  
  9568.  
  9569.  
  9570.  
  9571.  
  9572.  
  9573.  
  9574.  
  9575.  
  9576.      TCHK 2.1                                                    Page 146
  9577.  
  9578.   
  9579.   Function             inkey - get a key
  9580.   
  9581.   Syntax              int inkey(boolean wait);
  9582.   
  9583.   Prototype in        keyboard.h
  9584.   
  9585.   Remarks             inkey returns the key code of the key pressed. If
  9586.                       no key was pressed (WAIT = FALSE) 0 is returned.
  9587.                       This function is similar to getchar() except input
  9588.                       is not echoed to the screen and inkey will detect
  9589.                       any key press (any standard keypress. It cannot
  9590.                       distinguish between the grey '+' key and the white
  9591.                       '+'. This function is interrupt driven. It will
  9592.                       detect ALT combinations, Del, PgUp, function keys,
  9593.                       etc., any keyboard INTerrupt accepted keys.)
  9594.   
  9595.   Return value        returns the key code of the key pressed, from 1 to
  9596.                       511. If WAIT = FALSE, and no key is pressed, zero
  9597.                       is returned.
  9598.   
  9599.   See also            keycode.h
  9600.                       getc_match(), getk(), getc_match(), getlogical(),
  9601.                       getyn(), inkeyc(), inkeycdv(), inkeydv(),
  9602.                       tocapkey()
  9603.   
  9604.   Example             #include <keyboard.h>
  9605.                       #include <stdio.h>
  9606.   
  9607.                       main()
  9608.                       {
  9609.                            int c;
  9610.   
  9611.                            c = inkey(WAIT);
  9612.                            printf("Key code # in keycode.h: %d\n", c);
  9613.                       }
  9614.   
  9615.   
  9616.  
  9617.  
  9618.  
  9619.  
  9620.  
  9621.  
  9622.  
  9623.  
  9624.  
  9625.  
  9626.  
  9627.  
  9628.  
  9629.  
  9630.  
  9631.  
  9632.  
  9633.  
  9634.  
  9635.  
  9636.  
  9637.  
  9638.  
  9639.  
  9640.  
  9641.  
  9642.      TCHK 2.1                                                    Page 147
  9643.  
  9644.   
  9645.   Function             inkeyc - get a key, any alphabetics capitalized
  9646.   
  9647.   Syntax              int inkeyc(boolean wait);
  9648.   
  9649.   Prototype in        keyboard.h
  9650.   
  9651.   Remarks             inkeyc returns the key code of the key pressed. If
  9652.                       no key was pressed (WAIT = FALSE) 0 is returned.
  9653.                       Any letters detected are capitalized before being
  9654.                       returned. This function is similar to getchar()
  9655.                       except input is not echoed to the screen and inkeyc
  9656.                       will detect any key press (any standard keypress.
  9657.                       It cannot distinguish between the grey '+' key and
  9658.                       the white '+'. This function is interrupt driven.
  9659.                       It will detect ALT combinations, Del, PgUp,
  9660.                       function keys, etc., any keyboard INTerrupt
  9661.                       accepted keys.)
  9662.   
  9663.   Return value        returns the key code of the key pressed, from 1 to
  9664.                       511, all letters are capitalized. If WAIT = FALSE,
  9665.                       and no key is pressed, zero is returned.
  9666.   
  9667.   See also            keycode.h
  9668.                       getc_match(), getk(), getc_match(), getlogical(),
  9669.                       getyn(), inkey(), inkeycdv(), inkeydv(), tocapkey()
  9670.   
  9671.   Example             #include <keyboard.h>
  9672.                       #include <stdio.h>
  9673.   
  9674.                       main()
  9675.                       {
  9676.                            int c;
  9677.   
  9678.                            c = inkeyc(WAIT);
  9679.                            printf("Key code # in keycode.h: %d\n", c);
  9680.                       }
  9681.   
  9682.   
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.  
  9695.  
  9696.  
  9697.  
  9698.  
  9699.  
  9700.  
  9701.  
  9702.  
  9703.  
  9704.  
  9705.  
  9706.  
  9707.  
  9708.      TCHK 2.1                                                    Page 148
  9709.  
  9710.   
  9711.   Function             inkeycdv - get a key, any alphabetics
  9712.                                      capitalized, DESQview aware
  9713.   
  9714.   Syntax              int inkeycdv(boolean wait);
  9715.   
  9716.   Prototype in        keyboard.h
  9717.   
  9718.   Remarks             inkeycdv returns the key code of the key pressed.
  9719.                       If no key was pressed (WAIT = FALSE) 0 is returned.
  9720.                       Any letters detected are capitalized before being
  9721.                       returned. This function is similar to getchar()
  9722.                       except input is not echoed to the screen and inkeyc
  9723.                       will detect any key press (any standard keypress.
  9724.                       It cannot distinguish between the grey '+' key and
  9725.                       the white '+'. This function is interrupt driven.
  9726.                       It will detect ALT combinations, Del, PgUp,
  9727.                       function keys, etc., any keyboard INTerrupt
  9728.                       accepted keys.)
  9729.   
  9730.                       When running under DESQview, inkeydv() will free up
  9731.                       time slices while waiting for a keypress. DESQview
  9732.                       is detected by the variable _dvmajor not equal to
  9733.                       zero. DESQversion() should be invoked sometime
  9734.                       before using inkeydv().
  9735.   
  9736.   Return value        returns the key code of the key pressed, from 1 to
  9737.                       511, all letters are capitalized. If WAIT = FALSE,
  9738.                       and no key is pressed, zero is returned.
  9739.   
  9740.   See also            keycode.h
  9741.                       DESQversion(), getc_match(), getk(), getc_match(),
  9742.                       getlogical(), getyn(), inkey(), inkeyc(),
  9743.                       inkeydv(), tocapkey()
  9744.   
  9745.   Example             #include <keyboard.h>
  9746.                       #include <multihk.h>
  9747.                       #include <stdio.h>
  9748.   
  9749.                       main()
  9750.                       {
  9751.                            int c;
  9752.   
  9753.                            DESQversion();
  9754.                            c = inkeycdv(WAIT);
  9755.                            printf("Key code # in keycode.h: %d\n", c);
  9756.                       }
  9757.   
  9758.   
  9759.  
  9760.  
  9761.  
  9762.  
  9763.  
  9764.  
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.  
  9771.  
  9772.  
  9773.  
  9774.      TCHK 2.1                                                    Page 149
  9775.  
  9776.   
  9777.   Function             inkeydv - get a key, DESQview aware
  9778.   
  9779.   Syntax              int inkeydv(boolean wait);
  9780.   
  9781.   Prototype in        keyboard.h
  9782.   
  9783.   Remarks             inkeydv returns the key code of the key pressed. If
  9784.                       no key was pressed (WAIT = FALSE) 0 is returned.
  9785.                       This function is similar to getchar() except input
  9786.                       is not echoed to the screen and inkeydv will detect
  9787.                       any key press (any standard keypress. It cannot
  9788.                       distinguish between the grey '+' key and the white
  9789.                       '+'. This function is interrupt driven. It will
  9790.                       detect ALT combinations, Del, PgUp, function keys,
  9791.                       etc., any keyboard INTerrupt accepted keys.)
  9792.   
  9793.                       When running under DESQview, inkeydv() will free up
  9794.                       time slices while waiting for a keypress. DESQview
  9795.                       is detected by the variable _dvmajor not equal to
  9796.                       zero. DESQversion() should be invoked sometime
  9797.                       before using inkeydv().
  9798.   
  9799.   Return value        returns the key code of the key pressed, from 1 to
  9800.                       511. If WAIT = FALSE, and no key is pressed, zero
  9801.                       is returned.
  9802.   
  9803.   See also            keycode.h
  9804.                       DESQversion(), getc_match(), getk(), getc_match(),
  9805.                       getlogical(), getyn(), inkey(), inkeyc(),
  9806.                       inkeycdv(), tocapkey()
  9807.   
  9808.   Example             #include <keyboard.h>
  9809.                       #include <multihk.h>
  9810.                       #include <stdio.h>
  9811.   
  9812.                       main()
  9813.                       {
  9814.                            int c;
  9815.   
  9816.                            DESQversion();
  9817.                            c = inkeydv(WAIT);
  9818.                            printf("Key code # in keycode.h: %d\n", c);
  9819.                       }
  9820.   
  9821.   
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.      TCHK 2.1                                                    Page 150
  9841.  
  9842.   
  9843.   Function             intlen - calculate length of integer in a string
  9844.   
  9845.   Syntax              int intlen(char *number);
  9846.   
  9847.   Prototype in        stringhk.h
  9848.   
  9849.   Remarks             intlen calculates the length of an integer in the
  9850.                       string number. The integer is terminated by a
  9851.                       non-digit (any character other than 0-9.) This
  9852.                       function is used internally by strcomma.
  9853.   
  9854.   Return value        the length of the integer pointed to by number.
  9855.   
  9856.   Example             #include <stringhk.h>
  9857.                       #include <stdio.h>            /* for the printf */
  9858.                       #include <alloc.h>            /* for the calloc */
  9859.   
  9860.                       main()
  9861.                       {
  9862.                            char *sint[15];
  9863.                            int len;
  9864.   
  9865.                            strcpy(sint,"1839.44");
  9866.                            printf("String: %s    Length of integer: %d\n"
  9867.                                   , sint, intlen(sint));
  9868.                            strcpy(sint,"19,848");
  9869.                            printf("String: %s    Length of integer: %d\n"
  9870.                                   , sint, intlen(sint));
  9871.                            strcpy(sint,"44x993");
  9872.                            printf("String: %s    Length of integer: %d\n"
  9873.                                   , sint, intlen(sint));
  9874.                       }
  9875.   
  9876.   Program output      String: 1839.44    Length of integer: 4
  9877.                       String: 19,848    Length of integer: 2
  9878.                       String: 44x993    Length of integer: 2
  9879.   
  9880.   
  9881.  
  9882.  
  9883.  
  9884.  
  9885.  
  9886.  
  9887.  
  9888.  
  9889.  
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.      TCHK 2.1                                                    Page 151
  9907.  
  9908.   
  9909.   Function             InsLock - set the Insert key state
  9910.   
  9911.   Syntax              void InsLock(boolean on);
  9912.   
  9913.   Prototype in        ibm.h
  9914.   
  9915.   Remarks             sets the Insert key state to the state selected by
  9916.                       the on parameter.
  9917.   
  9918.   Return value        nothing.
  9919.   
  9920.   See also            CapsLock(), NumLock(), SrollLock()
  9921.   
  9922.  
  9923.  
  9924.  
  9925.  
  9926.  
  9927.  
  9928.  
  9929.  
  9930.  
  9931.  
  9932.  
  9933.  
  9934.  
  9935.  
  9936.  
  9937.  
  9938.  
  9939.  
  9940.  
  9941.  
  9942.  
  9943.  
  9944.  
  9945.  
  9946.  
  9947.  
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.  
  9971.  
  9972.      TCHK 2.1                                                    Page 152
  9973.  
  9974.   
  9975.   Function             is2nd8259 - is a 2nd 8259 chip installed
  9976.   
  9977.   Syntax              int is2nd8259(void)
  9978.   
  9979.   Prototype in        ibm.h
  9980.   
  9981.   Remarks             is2nd8259() detects if a 2nd 8259 chip is
  9982.                       installed.
  9983.   
  9984.   Return value        returns 1 if a 2nd 8259 chip is installed, 0 if it
  9985.                       is not, and -1 if this function is not supported.
  9986.   
  9987.   Note                the 1/10/86 XT BIOS returns an incorrect value for
  9988.                       this function, so if the machine is an IBM XT or
  9989.                       compatible with a BIOS date of 1/10/86, do not use
  9990.                       this function.
  9991.   
  9992.   Example             #include <ibm.h>
  9993.   
  9994.                       main()
  9995.                       {
  9996.                            printf("2nd 8259 chip: ");
  9997.                            switch (is2nd8259()) {
  9998.                                 case -1: printf("Error");  break;
  9999.                                 case  0: printf("No");  break;
  10000.                                 case  1: printf("Yes");  break;
  10001.                       }
  10002.   
  10003.   
  10004.  
  10005.  
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.  
  10035.  
  10036.  
  10037.  
  10038.      TCHK 2.1                                                    Page 153
  10039.  
  10040.   
  10041.   Function             isallalpha - are all characters in string
  10042.                                      alphabetic
  10043.   
  10044.   Syntax              boolean isallalpha(char *str);
  10045.   
  10046.   Prototype in        stringhk.h
  10047.   
  10048.   Remarks             checks if all characters in str are alphabetic.
  10049.   
  10050.   Return value        returns TRUE if all characters in str are
  10051.                       alphabetic, FALSE otherwise.
  10052.   
  10053.   See also            isallalphanum(), isalllower(), isallupper()
  10054.   
  10055.   
  10056.  
  10057.  
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.  
  10066.  
  10067.  
  10068.  
  10069.  
  10070.  
  10071.  
  10072.  
  10073.  
  10074.  
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.  
  10093.  
  10094.  
  10095.  
  10096.  
  10097.  
  10098.  
  10099.  
  10100.  
  10101.  
  10102.  
  10103.  
  10104.      TCHK 2.1                                                    Page 154
  10105.  
  10106.   
  10107.   Function             isallalphanum - are all characters in string
  10108.                                         alphanumeric
  10109.   
  10110.   Syntax              boolean isallalphanum(char *str);
  10111.   
  10112.   Prototype in        stringhk.h
  10113.   
  10114.   Remarks             checks if all characters in str are alphanumeric.
  10115.   
  10116.   Return value        returns TRUE if all characters in str are
  10117.                       alphanumeric, FALSE otherwise.
  10118.   
  10119.   See also            isallalpha(), isalllower(), isallupper()
  10120.   
  10121.   
  10122.  
  10123.  
  10124.  
  10125.  
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.  
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.  
  10141.  
  10142.  
  10143.  
  10144.  
  10145.  
  10146.  
  10147.  
  10148.  
  10149.  
  10150.  
  10151.  
  10152.  
  10153.  
  10154.  
  10155.  
  10156.  
  10157.  
  10158.  
  10159.  
  10160.  
  10161.  
  10162.  
  10163.  
  10164.  
  10165.  
  10166.  
  10167.  
  10168.  
  10169.  
  10170.      TCHK 2.1                                                    Page 155
  10171.  
  10172.   
  10173.   Function             isalllower - are all characters in string
  10174.                                      lower case
  10175.   
  10176.   Syntax              boolean isalllower(char *str);
  10177.   
  10178.   Prototype in        stringhk.h
  10179.   
  10180.   Remarks             checks if all characters in str are lower case.
  10181.   
  10182.   Return value        returns TRUE if all characters in str are lower
  10183.                       case, FALSE otherwise.
  10184.   
  10185.   See also            isallalpha(), isallalphanum(), isallupper()
  10186.   
  10187.   
  10188.  
  10189.  
  10190.  
  10191.  
  10192.  
  10193.  
  10194.  
  10195.  
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.  
  10205.  
  10206.  
  10207.  
  10208.  
  10209.  
  10210.  
  10211.  
  10212.  
  10213.  
  10214.  
  10215.  
  10216.  
  10217.  
  10218.  
  10219.  
  10220.  
  10221.  
  10222.  
  10223.  
  10224.  
  10225.  
  10226.  
  10227.  
  10228.  
  10229.  
  10230.  
  10231.  
  10232.  
  10233.  
  10234.  
  10235.  
  10236.      TCHK 2.1                                                    Page 156
  10237.  
  10238.   
  10239.   Function             isallupper - are all characters in string
  10240.                                      upper case
  10241.   
  10242.   Syntax              boolean isallupper(char *str);
  10243.   
  10244.   Prototype in        stringhk.h
  10245.   
  10246.   Remarks             checks if all characters in str are upper case.
  10247.   
  10248.   Return value        returns TRUE if all characters in str are upper
  10249.                       case, FALSE otherwise.
  10250.   
  10251.   See also            isallalpha(), isallalphanum(), isalllower()
  10252.   
  10253.   
  10254.  
  10255.  
  10256.  
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.  
  10264.  
  10265.  
  10266.  
  10267.  
  10268.  
  10269.  
  10270.  
  10271.  
  10272.  
  10273.  
  10274.  
  10275.  
  10276.  
  10277.  
  10278.  
  10279.  
  10280.  
  10281.  
  10282.  
  10283.  
  10284.  
  10285.  
  10286.  
  10287.  
  10288.  
  10289.  
  10290.  
  10291.  
  10292.  
  10293.  
  10294.  
  10295.  
  10296.  
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.      TCHK 2.1                                                    Page 157
  10303.  
  10304.   
  10305.   Function             isAnarkey - is ANARKEY.COM by Steven Calwas
  10306.                                      installed
  10307.   
  10308.   Syntax              boolean isAnarkey(void);
  10309.   
  10310.   Prototype in        doshk.h
  10311.   
  10312.   Remarks             checks if ANARKEY.COM is installed (command line
  10313.                       recall programm by Steven Calwas)
  10314.   
  10315.   Return value        returns TRUE if Anarkey is installed, FALSE
  10316.                       otherwise.
  10317.   
  10318.   Note                The default function number used by Anarkey is
  10319.                       0xE3. However, the function number used by Anarkey
  10320.                       can be changed by the Anarkey user at runtime. This
  10321.                       function assumes that the function number used by
  10322.                       Anarkey is 0xE3. If Anarkey is using a different
  10323.                       function number, isAnarkey() will not perform
  10324.                       reliably. Refer to the Anarkey documentation for
  10325.                       further details.
  10326.   
  10327.   Example             #include <doshk.h>
  10328.   
  10329.                       main()
  10330.                       {
  10331.                            printf("Anarkey is ");
  10332.                            if (! isAnarkey())
  10333.                                 printf("not ");
  10334.                            printf("installed\n");
  10335.                       }
  10336.   
  10337.  
  10338.  
  10339.  
  10340.  
  10341.  
  10342.  
  10343.  
  10344.  
  10345.  
  10346.  
  10347.  
  10348.  
  10349.  
  10350.  
  10351.  
  10352.  
  10353.  
  10354.  
  10355.  
  10356.  
  10357.  
  10358.  
  10359.  
  10360.  
  10361.  
  10362.  
  10363.  
  10364.  
  10365.  
  10366.  
  10367.  
  10368.      TCHK 2.1                                                    Page 158
  10369.  
  10370.   
  10371.   Function             isAppendavail - is APPEND installed
  10372.   
  10373.   Syntax              boolean isAppendavail(void);
  10374.   
  10375.   Prototype in        doshk.h
  10376.   
  10377.   Remarks             checks if APPEND is installed.
  10378.   
  10379.   Return value        returns TRUE if APPEND is installed, FALSE
  10380.                       otherwise.
  10381.   
  10382.   See also            isAssignavail(), isShareAvail()
  10383.   
  10384.   Example             #include <ibm.h>
  10385.   
  10386.                       main()
  10387.                       {
  10388.                            printf("APPEND is ");
  10389.                            if (! isAppendavail())
  10390.                                 printf("not ");
  10391.                            printf("installed\n");
  10392.                       }
  10393.   
  10394.  
  10395.  
  10396.  
  10397.  
  10398.  
  10399.  
  10400.  
  10401.  
  10402.  
  10403.  
  10404.  
  10405.  
  10406.  
  10407.  
  10408.  
  10409.  
  10410.  
  10411.  
  10412.  
  10413.  
  10414.  
  10415.  
  10416.  
  10417.  
  10418.  
  10419.  
  10420.  
  10421.  
  10422.  
  10423.  
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.  
  10433.  
  10434.      TCHK 2.1                                                    Page 159
  10435.  
  10436.   
  10437.   Function             isAssignavail - is ASSIGN installed
  10438.   
  10439.   Syntax              boolean isAssignavail(void);
  10440.   
  10441.   Prototype in        doshk.h
  10442.   
  10443.   Remarks             checks if ASSIGN is installed.
  10444.   
  10445.   Return value        returns TRUE if ASSIGN is installed, FALSE
  10446.                       otherwise.
  10447.   
  10448.   See also            getAssignmemseg(), isAppendavail(), isShareAvail()
  10449.   
  10450.   Example             #include <ibm.h>
  10451.   
  10452.                       main()
  10453.                       {
  10454.                            printf("ASSIGN is ");
  10455.                            if (! isAssignavail())
  10456.                                 printf("not ");
  10457.                            printf("installed\n");
  10458.                       }
  10459.   
  10460.  
  10461.  
  10462.  
  10463.  
  10464.  
  10465.  
  10466.  
  10467.  
  10468.  
  10469.  
  10470.  
  10471.  
  10472.  
  10473.  
  10474.  
  10475.  
  10476.  
  10477.  
  10478.  
  10479.  
  10480.  
  10481.  
  10482.  
  10483.  
  10484.  
  10485.  
  10486.  
  10487.  
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.  
  10499.  
  10500.      TCHK 2.1                                                    Page 160
  10501.  
  10502.   
  10503.   Function             isAutoPark - is AUTOPARK.COM by Alan D. Jones
  10504.                                      installed
  10505.   
  10506.   Syntax              boolean isAutoPark(void);
  10507.   
  10508.   Prototype in        doshk.h
  10509.   
  10510.   Remarks             checks if AutoPark.COM installed (resident hard
  10511.                       disk parker by Alan D. Jones)
  10512.   
  10513.   Return value        returns TRUE if is installed, FALSE otherwise.
  10514.   
  10515.   See also            setAutoPark()
  10516.   
  10517.   Example             #include <doshk.h>
  10518.   
  10519.                       main()
  10520.                       {
  10521.                            printf("AutoPark is ");
  10522.                            if (! isAutoPark())
  10523.                                 printf("not ");
  10524.                            printf("installed\n");
  10525.                       }
  10526.   
  10527.  
  10528.  
  10529.  
  10530.  
  10531.  
  10532.  
  10533.  
  10534.  
  10535.  
  10536.  
  10537.  
  10538.  
  10539.  
  10540.  
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.  
  10559.  
  10560.  
  10561.  
  10562.  
  10563.  
  10564.  
  10565.  
  10566.      TCHK 2.1                                                    Page 161
  10567.  
  10568.   
  10569.   Function             isBlogical - is drive B: logical
  10570.   
  10571.   Syntax              boolean isBlogical(void);
  10572.   
  10573.   Prototype in        ibm.h
  10574.   
  10575.   Remarks             checks if drive B: is logical or physical
  10576.   
  10577.   Return value        returns TRUE if drive B: is logical, FALSE
  10578.                       otherwise.
  10579.   
  10580.   Example             #include <ibm.h>
  10581.   
  10582.                       main()
  10583.                       {
  10584.                            printf("Drive B: is ");
  10585.                            if (isBlogical())
  10586.                                 printf("logical\n");
  10587.                            else
  10588.                                 printf("physical\n");
  10589.                       }
  10590.   
  10591.  
  10592.  
  10593.  
  10594.  
  10595.  
  10596.  
  10597.  
  10598.  
  10599.  
  10600.  
  10601.  
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.  
  10620.  
  10621.  
  10622.  
  10623.  
  10624.  
  10625.  
  10626.  
  10627.  
  10628.  
  10629.  
  10630.  
  10631.  
  10632.      TCHK 2.1                                                    Page 162
  10633.  
  10634.   
  10635.   Function             isBREAKon - check Ctrl-BREAK flag
  10636.   
  10637.   Syntax              #include <ibm.h>
  10638.                       isBREAKon();
  10639.   
  10640.   Prototype in        ibm.h
  10641.   
  10642.   Remarks             checks the state of the Ctrl-BREAK flag. The BREAK
  10643.                       status flag can be set from DOS by BREAK ON or
  10644.                       BREAK OFF.
  10645.   
  10646.                       This function is a macro.
  10647.   
  10648.   Return value        returns TRUE if the break flag is on, FALSE if the
  10649.                       flag is off.
  10650.   
  10651.   See also            isVERIFYon(), setBREAK(), setVERIFY()
  10652.   
  10653.   Example             #include <ibm.h>
  10654.   
  10655.                       main()
  10656.                       {
  10657.                            printf("BREAK flag is ");
  10658.                            if (! isBREAKon())
  10659.                                 printf("not ");
  10660.                            printf("on\n");
  10661.                       }
  10662.   
  10663.  
  10664.  
  10665.  
  10666.  
  10667.  
  10668.  
  10669.  
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.  
  10677.  
  10678.  
  10679.  
  10680.  
  10681.  
  10682.  
  10683.  
  10684.  
  10685.  
  10686.  
  10687.  
  10688.  
  10689.  
  10690.  
  10691.  
  10692.  
  10693.  
  10694.  
  10695.  
  10696.  
  10697.  
  10698.      TCHK 2.1                                                    Page 163
  10699.  
  10700.   
  10701.   Function             iscdevicemoderaw - is character device in "raw"
  10702.                                          mode
  10703.   
  10704.   Syntax              int iscdevicemoderaw(int handle);
  10705.   
  10706.   Prototype in        doshhk.h
  10707.   
  10708.   Remarks             iscdevicemoderaw() detects if character device
  10709.                       associated with handle is in "cooked" or "raw"
  10710.                       mode. In cooked mode, DOS performs some translation
  10711.                       of characters, while in raw mode no translation is
  10712.                       performed.
  10713.   
  10714.   Return value        iscdevicemoderaw returns:
  10715.   
  10716.                             1:  raw mode
  10717.                             0:  cooked mode
  10718.                            -1:  error
  10719.   
  10720.                       If there was an error, Borland's variable errno
  10721.                       will contain the error code as follows:
  10722.   
  10723.                             1   function number invalid
  10724.                             4   no handle available
  10725.                             5   access denied
  10726.                             6   handle invalid or not open
  10727.                            13   data invalid
  10728.   
  10729.   See also            isdrivelocal(), ishandlelocal(), isRedirectStdin(),
  10730.                       isRedirectStdout(), isremoveable(),
  10731.                       setcdevicemode()
  10732.   
  10733.   
  10734.  
  10735.  
  10736.  
  10737.  
  10738.  
  10739.  
  10740.  
  10741.  
  10742.  
  10743.  
  10744.  
  10745.  
  10746.  
  10747.  
  10748.  
  10749.  
  10750.  
  10751.  
  10752.  
  10753.  
  10754.  
  10755.  
  10756.  
  10757.  
  10758.  
  10759.  
  10760.  
  10761.  
  10762.  
  10763.  
  10764.      TCHK 2.1                                                    Page 164
  10765.  
  10766.   
  10767.   Function             isCEDavail - is CED installed
  10768.   
  10769.   Syntax              boolean isCEDavail(void);
  10770.   
  10771.   Prototype in        doshk.h
  10772.   
  10773.   Remarks             checks if CED installed
  10774.   
  10775.   Return value        returns TRUE if is installed, FALSE otherwise.
  10776.   
  10777.   See also            CEDadd(), CEDremove()
  10778.   
  10779.   Example             #include <doshk.h>
  10780.   
  10781.                       main()
  10782.                       {
  10783.                            printf("CED is ");
  10784.                            if (! isCEDavail())
  10785.                                 printf("not ");
  10786.                            printf("installed\n");
  10787.                       }
  10788.   
  10789.  
  10790.  
  10791.  
  10792.  
  10793.  
  10794.  
  10795.  
  10796.  
  10797.  
  10798.  
  10799.  
  10800.  
  10801.  
  10802.  
  10803.  
  10804.  
  10805.  
  10806.  
  10807.  
  10808.  
  10809.  
  10810.  
  10811.  
  10812.  
  10813.  
  10814.  
  10815.  
  10816.  
  10817.  
  10818.  
  10819.  
  10820.  
  10821.  
  10822.  
  10823.  
  10824.  
  10825.  
  10826.  
  10827.  
  10828.  
  10829.  
  10830.      TCHK 2.1                                                    Page 165
  10831.  
  10832.   
  10833.   Function             isCGA - is Color Graphics adapter installed
  10834.                        isEGA - is Enhanced Graphics adapter installed
  10835.                        isHerc - is Hercules Graphics adapter installed
  10836.                        isMDA - is Monochrome adapter installed
  10837.   
  10838.                        ismono - is monochrome display
  10839.                        iscolor - is color display
  10840.   
  10841.   Syntax              boolean isMDA(void);
  10842.                       boolean isCGA(void);
  10843.                       boolean isEGA(void);
  10844.                       boolean isHerc(void);
  10845.   
  10846.                       #include <video.h>
  10847.                       ismono()
  10848.                       iscolor()
  10849.   
  10850.   Prototype in        video.h
  10851.   
  10852.   Remarks             is...() check if a video adapter is present.
  10853.                       ismono() checks if the display is mono.
  10854.                       iscolor() checks if the display is color.
  10855.   
  10856.                       The ismono() and iscolor() are macros. Use them if
  10857.                       you wish to check what attributes to use (underline
  10858.                       or red?) and use the adapter functions (isEGA,
  10859.                       etc.) for adapter specific tests.
  10860.   
  10861.   Return value        these functions return TRUE if the video adapter or
  10862.                       type, as the case may be, is present. Otherwise
  10863.                       they return FALSE.
  10864.   
  10865.   See also            video.h
  10866.   
  10867.   Example             #include <video.h>
  10868.   
  10869.                       main()
  10870.                       {
  10871.                            if (ismono())            /* monochrome */
  10872.                                 if (isHerc())
  10873.                                      printf("Hercules");
  10874.                                 else
  10875.                                      printf("MDA");
  10876.                            else                /* color */
  10877.                                 if (isEGA())
  10878.                                      printf("EGA");
  10879.                                 else
  10880.                                      printf("CGA");
  10881.                       }
  10882.   
  10883.   
  10884.  
  10885.  
  10886.  
  10887.  
  10888.  
  10889.  
  10890.  
  10891.  
  10892.  
  10893.  
  10894.  
  10895.  
  10896.      TCHK 2.1                                                    Page 166
  10897.  
  10898.   
  10899.   Function             isdate - character classification
  10900.   
  10901.   Syntax              boolean isdate(int c);
  10902.   
  10903.   Prototype in        keyboard.h
  10904.   
  10905.   Remarks             determines if a character is valid for a date. Only
  10906.                       the following characters are allowed:
  10907.   
  10908.                            0  1  2  3  4  5  6  7  8  9  -  /
  10909.   
  10910.   Return value        returns true if c is a valid date character, FALSE
  10911.                       otherwise.
  10912.   
  10913.   
  10914.  
  10915.  
  10916.  
  10917.  
  10918.  
  10919.  
  10920.  
  10921.  
  10922.  
  10923.  
  10924.  
  10925.  
  10926.  
  10927.  
  10928.  
  10929.  
  10930.  
  10931.  
  10932.  
  10933.  
  10934.  
  10935.  
  10936.  
  10937.  
  10938.  
  10939.  
  10940.  
  10941.  
  10942.  
  10943.  
  10944.  
  10945.  
  10946.  
  10947.  
  10948.  
  10949.  
  10950.  
  10951.  
  10952.  
  10953.  
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960.  
  10961.  
  10962.      TCHK 2.1                                                    Page 167
  10963.  
  10964.   
  10965.   Function             isdir - is a FAT entry a subdirectory
  10966.   
  10967.   Syntax              boolean isdir(char *fspec);
  10968.   
  10969.   Prototype in        filehk.h
  10970.   
  10971.   Remarks             checks if a FAT entry is a valid subdirectory. The
  10972.                       string fspec should be in the following format:
  10973.   
  10974.                            [d:][path]filename.ext[\]
  10975.   
  10976.                       where
  10977.   
  10978.                            d: = optional drive letter
  10979.                            path = optional path
  10980.                            filename.ext = the name of the FAT entry you
  10981.                                           want to check
  10982.                       fspec may optionally have a \ at the end
  10983.   
  10984.                       Wildcards (*,?) are NOT supported and always cause
  10985.                       isdir to return FALSE.
  10986.   
  10987.                       This function does not harm the dta. The dta is
  10988.                       modified by this function, but restored before
  10989.                       returning.
  10990.   
  10991.   Return value        returns TRUE if fspec is a subdirectory, FALSE if
  10992.                       fspec does not exist or is not a subdirectory.
  10993.   
  10994.   See also            fileexist()
  10995.   
  10996.   Example             #include <filehk.h>
  10997.   
  10998.                       main()
  10999.                       {
  11000.                            char dirname[] = "a:\util\";
  11001.   
  11002.                            printf("%s is ",dirname);
  11003.                            if (! isdir())
  11004.                                 printf("not ");
  11005.                            printf("a subdirectory\n");
  11006.                       }
  11007.   
  11008.  
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.      TCHK 2.1                                                    Page 168
  11029.  
  11030.   
  11031.   Function             isDoubleDOS - is DoubleDOS installed
  11032.   
  11033.   Syntax              boolean isDoubleDOS(void);
  11034.   
  11035.   Prototype in        multihk.h
  11036.   
  11037.   Remarks             detects if Double DOS is running.
  11038.   
  11039.   Return value        returns TRUE if Double DOS is running, FALSE
  11040.                       otherwise.
  11041.   
  11042.   See also            DoubleDOSfreeCPU(), DoubleDOSGetVirtual(),
  11043.                       DoubleDOSTaskSwitch(), isInvisible()
  11044.   
  11045.   Example             #include <ibm.h>
  11046.   
  11047.                       main()
  11048.                       {
  11049.                            printf("Double DOS is ");
  11050.                            if (! isDoubleDOS())
  11051.                                 printf("not ");
  11052.                            printf("installed");
  11053.                       }
  11054.   
  11055.   
  11056.  
  11057.  
  11058.  
  11059.  
  11060.  
  11061.  
  11062.  
  11063.  
  11064.  
  11065.  
  11066.  
  11067.  
  11068.  
  11069.  
  11070.  
  11071.  
  11072.  
  11073.  
  11074.  
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.  
  11092.  
  11093.  
  11094.      TCHK 2.1                                                    Page 169
  11095.  
  11096.   
  11097.   Function             isdrivelocal - is drive local or remote
  11098.   
  11099.   Syntax              int isdrivelocal(int drive);
  11100.   
  11101.   Prototype in        doshhk.h
  11102.   
  11103.   Remarks             isdrivelocal() detects if a drive determined by
  11104.                       drive, where 0=default, 1=A, 2=B, etc. is local
  11105.                       (Microsoft Networks) or remote (redirected to
  11106.                       server).
  11107.   
  11108.                       isdrivelocal requires DOS 3.x+
  11109.   
  11110.   Return value        isdrivelocal returns:
  11111.   
  11112.                             0:  remote
  11113.                             1:  local
  11114.                            -1:  error
  11115.   
  11116.                       If there was an error, Borland's variable errno
  11117.                       will contain the error code as follows:
  11118.   
  11119.                             1   function number invalid
  11120.                             4   no handle available
  11121.                             5   access denied
  11122.                            13   data invalid
  11123.                            15   drive number invalid
  11124.   
  11125.   See also            iscdevicemoderaw(), ishandlelocal(),
  11126.                       isRedirectStdin(), isRedirectStdout(),
  11127.                       isremoveable(), setcdevicemode()
  11128.   
  11129.   
  11130.  
  11131.  
  11132.  
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.  
  11153.  
  11154.  
  11155.  
  11156.  
  11157.  
  11158.  
  11159.  
  11160.      TCHK 2.1                                                    Page 170
  11161.  
  11162.   
  11163.   Function             isDriverSys - is DRIVER.SYS installed
  11164.   
  11165.   Syntax              unsigned char isDriverSys(void);
  11166.   
  11167.   Prototype in        doshk.h
  11168.   
  11169.   Remarks             checks if DRIVER.SYS is installed.
  11170.   
  11171.   Return value        returns one of the following values:
  11172.   
  11173.                            0x00 - not installed, OK to install
  11174.                            0x01 - not installed, not OK to install
  11175.                            0xFF - installed
  11176.   
  11177.   Example             #include <doshk.h>
  11178.   
  11179.                       main()
  11180.                       {
  11181.                            printf("DRIVER.SYS is ");
  11182.                            if (isDriverSys() != 0xFF)
  11183.                                 printf("not ");
  11184.                            printf("installed\n");
  11185.                       }
  11186.   
  11187.   
  11188.  
  11189.  
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.  
  11211.  
  11212.  
  11213.  
  11214.  
  11215.  
  11216.  
  11217.  
  11218.  
  11219.  
  11220.  
  11221.  
  11222.  
  11223.  
  11224.  
  11225.  
  11226.      TCHK 2.1                                                    Page 171
  11227.  
  11228.   
  11229.   Function             isEMSavail - is EMS available
  11230.   
  11231.   Syntax              boolean isEMSavail(void);
  11232.   
  11233.   Prototype in        ibm.h
  11234.   
  11235.   Remarks             checks if EMS is installed.
  11236.   
  11237.   Return value        returns TRUE if EMS is present, otherwise FALSE.
  11238.   
  11239.   See also            ibm.h
  11240.                       EMSGetStatus(), EMSinfo(), EMSpages(),
  11241.                       EMMversion(), EMSwarmbootprep()
  11242.   
  11243.   Example             #include <ibm.h>
  11244.   
  11245.                       main()
  11246.                       {
  11247.                            printf("EMS is ");
  11248.                            if (! isEMSavail())
  11249.                                 printf("not ");
  11250.                            printf("available\n");
  11251.                       }
  11252.   
  11253.   
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265.  
  11266.  
  11267.  
  11268.  
  11269.  
  11270.  
  11271.  
  11272.  
  11273.  
  11274.  
  11275.  
  11276.  
  11277.  
  11278.  
  11279.  
  11280.  
  11281.  
  11282.  
  11283.  
  11284.  
  11285.  
  11286.  
  11287.  
  11288.  
  11289.  
  11290.  
  11291.  
  11292.      TCHK 2.1                                                    Page 172
  11293.  
  11294.   
  11295.   Function             isEnhanceKbd - is an enhanced keyboard installed
  11296.   
  11297.   Syntax              boolean isEnhanceKbd(void);
  11298.   
  11299.   Prototype in        ibm.h
  11300.   
  11301.   Remarks             checks if the keyboard is enhanced (102 keys or 101
  11302.                       in Europe). Does your keyboard have F11 and F12? If
  11303.                       so, it's an enhanced keyboard.
  11304.   
  11305.   Return value        returns TRUE if an enhanced keyboard is installed,
  11306.                       FALSE otherwise.
  11307.   
  11308.   Example             #include <ibm.h>
  11309.   
  11310.                       main()
  11311.                       {
  11312.                            printf("Keyboard is ");
  11313.                            if (isEnhanceKbd())
  11314.                                 printf("enhanced\n");
  11315.                            else
  11316.                                 printf("old style (85 keys)\n");
  11317.                       }
  11318.   
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.  
  11326.  
  11327.  
  11328.  
  11329.  
  11330.  
  11331.  
  11332.  
  11333.  
  11334.  
  11335.  
  11336.  
  11337.  
  11338.  
  11339.  
  11340.  
  11341.  
  11342.  
  11343.  
  11344.  
  11345.  
  11346.  
  11347.  
  11348.  
  11349.  
  11350.  
  11351.  
  11352.  
  11353.  
  11354.  
  11355.  
  11356.  
  11357.  
  11358.      TCHK 2.1                                                    Page 173
  11359.  
  11360.   
  11361.   Function             iseven - is a number even
  11362.   
  11363.   Syntax              #include <mathhk.h>
  11364.                       (boolean) iseven(x)
  11365.   
  11366.   Prototype in        mathhk.h
  11367.   
  11368.   Remarks             iseven checks if x is even (evenly divisible by 2).
  11369.   
  11370.                       This function is a macro.
  11371.   
  11372.   Return value        returns TRUE if x is even, otherwise FALSE.
  11373.   
  11374.   See also            isodd()
  11375.   
  11376.   
  11377.  
  11378.  
  11379.  
  11380.  
  11381.  
  11382.  
  11383.  
  11384.  
  11385.  
  11386.  
  11387.  
  11388.  
  11389.  
  11390.  
  11391.  
  11392.  
  11393.  
  11394.  
  11395.  
  11396.  
  11397.  
  11398.  
  11399.  
  11400.  
  11401.  
  11402.  
  11403.  
  11404.  
  11405.  
  11406.  
  11407.  
  11408.  
  11409.  
  11410.  
  11411.  
  11412.  
  11413.  
  11414.  
  11415.  
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.      TCHK 2.1                                                    Page 174
  11425.  
  11426.   
  11427.   Function             isExtended - is Extended memory installed
  11428.   
  11429.   Syntax              boolean isExtended(void);
  11430.   
  11431.   Prototype in        ibm.h
  11432.   
  11433.   Remarks             checks if Extended memory is installed.
  11434.   
  11435.   Return value        returns TRUE if Extended memory is installed, FALSE
  11436.                       otherwise.
  11437.   
  11438.   See also            Extendedtotal()
  11439.   
  11440.   Example             #include <ibm.h>
  11441.   
  11442.                       main()
  11443.                       {
  11444.                            printf("Extended memory is ");
  11445.                            if (! isExtended())
  11446.                                 printf("not ");
  11447.                            printf("installed\n");
  11448.                       }
  11449.   
  11450.  
  11451.  
  11452.  
  11453.  
  11454.  
  11455.  
  11456.  
  11457.  
  11458.  
  11459.  
  11460.  
  11461.  
  11462.  
  11463.  
  11464.  
  11465.  
  11466.  
  11467.  
  11468.  
  11469.  
  11470.  
  11471.  
  11472.  
  11473.  
  11474.  
  11475.  
  11476.  
  11477.  
  11478.  
  11479.  
  11480.  
  11481.  
  11482.  
  11483.  
  11484.  
  11485.  
  11486.  
  11487.  
  11488.  
  11489.  
  11490.      TCHK 2.1                                                    Page 175
  11491.  
  11492.   
  11493.   Function             isfilename - character classification
  11494.   
  11495.   Syntax              boolean isfilename(int c);
  11496.   
  11497.   Prototype in        keyboard.h
  11498.   
  11499.   Remarks             determines if a character is valid for a DOS
  11500.                       filename. The following characters are NOT allowed:
  11501.   
  11502.                       :  ;  ,  =  +  tab  space  <  >  |  /  \  "  [  ]
  11503.   
  11504.   Return value        returns true if c is a valid DOS filename
  11505.                       character, FALSE otherwise.
  11506.   
  11507.   Note                This function checks if a character is legal for a
  11508.                       DOS filename.ext. Use ispathname() to check for a
  11509.                       valid DOS pathname character.
  11510.   
  11511.   See also            ispathname()
  11512.   
  11513.   
  11514.  
  11515.  
  11516.  
  11517.  
  11518.  
  11519.  
  11520.  
  11521.  
  11522.  
  11523.  
  11524.  
  11525.  
  11526.  
  11527.  
  11528.  
  11529.  
  11530.  
  11531.  
  11532.  
  11533.  
  11534.  
  11535.  
  11536.  
  11537.  
  11538.  
  11539.  
  11540.  
  11541.  
  11542.  
  11543.  
  11544.  
  11545.  
  11546.  
  11547.  
  11548.  
  11549.  
  11550.  
  11551.  
  11552.  
  11553.  
  11554.  
  11555.  
  11556.      TCHK 2.1                                                    Page 176
  11557.  
  11558.   
  11559.   Function             isgameport - is a game port installed
  11560.   
  11561.   Syntax              boolean isgameport(void);
  11562.   
  11563.   Prototype in        ibm.h
  11564.   
  11565.   Remarks             checks if a game port is installed.
  11566.   
  11567.   Return value        returns TRUE if a game port is installed, FALSE
  11568.                       otherwise.
  11569.   
  11570.   See also            joystickAx(), joystickAy(), joystickBx(),
  11571.                       joystickBy(), joysticksettings()
  11572.   
  11573.   Example             #include <ibm.h>
  11574.   
  11575.                       main()
  11576.                       {
  11577.                            printf("Game port is ");
  11578.                            if (! isgameport())
  11579.                                 printf("not ");
  11580.                            printf("installed\n");
  11581.                       }
  11582.   
  11583.   
  11584.  
  11585.  
  11586.  
  11587.  
  11588.  
  11589.  
  11590.  
  11591.  
  11592.  
  11593.  
  11594.  
  11595.  
  11596.  
  11597.  
  11598.  
  11599.  
  11600.  
  11601.  
  11602.  
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.  
  11621.  
  11622.      TCHK 2.1                                                    Page 177
  11623.  
  11624.   
  11625.   Function             isgn - sign of an integer
  11626.   
  11627.   Syntax              #include <mathhk.h>
  11628.                       (int) isgn(x)
  11629.   
  11630.   Prototype in        mathhk.h
  11631.   
  11632.   Remarks             isgn will determine the sign of x. Zero is
  11633.                       considered positive.
  11634.   
  11635.                       This function is a macro.
  11636.   
  11637.                       The macros sgn() and sign() are defined as isgn().
  11638.   
  11639.   Return value        returns -1 if x is negative, otherwise 1.
  11640.   
  11641.   See also            fsgn(), lsgn()
  11642.   
  11643.   
  11644.  
  11645.  
  11646.  
  11647.  
  11648.  
  11649.  
  11650.  
  11651.  
  11652.  
  11653.  
  11654.  
  11655.  
  11656.  
  11657.  
  11658.  
  11659.  
  11660.  
  11661.  
  11662.  
  11663.  
  11664.  
  11665.  
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.  
  11680.  
  11681.  
  11682.  
  11683.  
  11684.  
  11685.  
  11686.  
  11687.  
  11688.      TCHK 2.1                                                    Page 178
  11689.  
  11690.   
  11691.   Function             ishandlelocal - is handle local or remote
  11692.   
  11693.   Syntax              int ishandlelocal(int handle);
  11694.   
  11695.   Prototype in        doshhk.h
  11696.   
  11697.   Remarks             ishandlelocal() detects if a handle is local
  11698.                       (Microsoft Networks) or remote (redirected to
  11699.                       server).
  11700.   
  11701.                       ishandlelocal requires DOS 3.x+
  11702.   
  11703.   Return value        ishandlelocal returns:
  11704.   
  11705.                             0:  remote
  11706.                             1:  local
  11707.                            -1:  error
  11708.   
  11709.                       If there was an error, Borland's variable errno
  11710.                       will contain the error code as follows:
  11711.   
  11712.                             1   function number invalid
  11713.                             4   no handle available
  11714.                             5   access denied
  11715.                             6   handle invalid or not open
  11716.                            13   data invalid
  11717.   
  11718.   See also            iscdevicemoderaw(), isdrivelocal(),
  11719.                       isRedirectStdin(), isRedirectStdout(),
  11720.                       isremoveable(), setcdevicemode()
  11721.   
  11722.   
  11723.  
  11724.  
  11725.  
  11726.  
  11727.  
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.  
  11739.  
  11740.  
  11741.  
  11742.  
  11743.  
  11744.  
  11745.  
  11746.  
  11747.  
  11748.  
  11749.  
  11750.  
  11751.  
  11752.  
  11753.  
  11754.      TCHK 2.1                                                    Page 179
  11755.  
  11756.   
  11757.   Function             isHiliteable - can a menu command be hilighted
  11758.   
  11759.   Syntax              boolean isHiliteable(char cmdtype,
  11760.                                            unsigned flagparms);
  11761.   
  11762.   Prototype in        menuhk.h
  11763.   
  11764.   Remarks             determines if a menu command can be hilighted.
  11765.   
  11766.                       This function is used internally by several menu
  11767.                       functions.
  11768.   
  11769.   Return value        TRUE if the menu command can be hilighted, FALSE
  11770.                       otherwise.
  11771.   
  11772.   Note                This function is for internal uses only.
  11773.   
  11774.   See also            menuhk.h
  11775.   
  11776.   
  11777.  
  11778.  
  11779.  
  11780.  
  11781.  
  11782.  
  11783.  
  11784.  
  11785.  
  11786.  
  11787.  
  11788.  
  11789.  
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.  
  11796.  
  11797.  
  11798.  
  11799.  
  11800.  
  11801.  
  11802.  
  11803.  
  11804.  
  11805.  
  11806.  
  11807.  
  11808.  
  11809.  
  11810.  
  11811.  
  11812.  
  11813.  
  11814.  
  11815.  
  11816.  
  11817.  
  11818.  
  11819.  
  11820.      TCHK 2.1                                                    Page 180
  11821.  
  11822.   
  11823.   Function             isInvisible - is this the invisible program under
  11824.                                       Double DOS
  11825.   
  11826.   Syntax              boolean isInvisible(void);
  11827.   
  11828.   Prototype in        multihk.h
  11829.   
  11830.   Remarks             detects if the current program is the invisible
  11831.                       program under Double DOS.
  11832.   
  11833.   Return value        returns TRUE if the current program is the invisble
  11834.                       program under Double DOS, FALSE otherwise.
  11835.   
  11836.   See also            DoubleDOSfreeCPU(), DoubleDOSGetVirtual(),
  11837.                       DoubleDOSTaskSwitch(), isDoubleDOS()
  11838.   
  11839.   Example             #include <ibm.h>
  11840.   
  11841.                       main()
  11842.                       {
  11843.                            printf("This program is ");
  11844.                            if (! isInvisible())
  11845.                                 printf("not ");
  11846.                            printf("the invisible program");
  11847.                       }
  11848.   
  11849.   
  11850.  
  11851.  
  11852.  
  11853.  
  11854.  
  11855.  
  11856.  
  11857.  
  11858.  
  11859.  
  11860.  
  11861.  
  11862.  
  11863.  
  11864.  
  11865.  
  11866.  
  11867.  
  11868.  
  11869.  
  11870.  
  11871.  
  11872.  
  11873.  
  11874.  
  11875.  
  11876.  
  11877.  
  11878.  
  11879.  
  11880.  
  11881.  
  11882.  
  11883.  
  11884.  
  11885.  
  11886.      TCHK 2.1                                                    Page 181
  11887.  
  11888.   
  11889.   Function             isleapyear - is a year a leap year
  11890.   
  11891.   Syntax              boolean isleapyear(int checkyear);
  11892.   
  11893.   Prototype in        datehk.h       (isleapyear)
  11894.   
  11895.   Remarks             checks if checkyear is a leap year (29 days in
  11896.                       February.)
  11897.   
  11898.   Return value        returns TRUE if checkyear is a leap year, FALSE
  11899.                       otherwise.
  11900.   
  11901.   See also            valid_date()
  11902.   
  11903.   Example             #include <datehk.h>
  11904.   
  11905.                       main()
  11906.                       {
  11907.                            int year;
  11908.   
  11909.                       /* assign some value to year */
  11910.                            printf("year %d is ",year);
  11911.                            if (! isleapyear(year))
  11912.                                 printf("not ");
  11913.                            printf("a leap year\n");
  11914.                       }
  11915.   
  11916.   
  11917.  
  11918.  
  11919.  
  11920.  
  11921.  
  11922.  
  11923.  
  11924.  
  11925.  
  11926.  
  11927.  
  11928.  
  11929.  
  11930.  
  11931.  
  11932.  
  11933.  
  11934.  
  11935.  
  11936.  
  11937.  
  11938.  
  11939.  
  11940.  
  11941.  
  11942.  
  11943.  
  11944.  
  11945.  
  11946.  
  11947.  
  11948.  
  11949.  
  11950.  
  11951.  
  11952.      TCHK 2.1                                                    Page 182
  11953.  
  11954.   
  11955.   Function             isMCA - is the bus Micro Channel Architecture
  11956.   
  11957.   Syntax              int isMCA(void);
  11958.   
  11959.   Prototype in        ibm.h
  11960.   
  11961.   Remarks             isMCA() detects if the bus is Micro Channel
  11962.                       Architecture.
  11963.   
  11964.   Return value        returns 1 if the bus is Micro Channel Architecture,
  11965.                       0 if it is not, and -1 if this function is not
  11966.                       supported.
  11967.   
  11968.   Note                the 1/10/86 XT BIOS returns an incorrect value for
  11969.                       this function, so if the machine is an IBM XT or
  11970.                       compatible with a BIOS date of 1/10/86, do not use
  11971.                       this function.
  11972.   
  11973.   See also            machine_id(), ROM_date(), ROM_id()
  11974.   
  11975.   Example             #include <ibm.h>
  11976.   
  11977.                       main()
  11978.                       {
  11979.                            printf("BUS type: ");
  11980.                            switch (isMCA()) {
  11981.                                 case -1: printf("Error");  break;
  11982.                                 case  0: printf("PC");  break;
  11983.                                 case  1: printf("MCA");  break;
  11984.                       }
  11985.   
  11986.   
  11987.  
  11988.  
  11989.  
  11990.  
  11991.  
  11992.  
  11993.  
  11994.  
  11995.  
  11996.  
  11997.  
  11998.  
  11999.  
  12000.  
  12001.  
  12002.  
  12003.  
  12004.  
  12005.  
  12006.  
  12007.  
  12008.  
  12009.  
  12010.  
  12011.  
  12012.  
  12013.  
  12014.  
  12015.  
  12016.  
  12017.  
  12018.      TCHK 2.1                                                    Page 183
  12019.  
  12020.   
  12021.   Function             ismouse - is a mouse installed
  12022.   
  12023.   Syntax              boolean ismouse(void);
  12024.   
  12025.   Prototype in        mousehk.h
  12026.   
  12027.   Remarks             ismouse() detects if a mouse is installed, and if
  12028.                       so, how many buttons it has. If a mouse is
  12029.                       installed, _mouse1 will contain the returned AX
  12030.                       register (is a mouse installed), and _mouse2 will
  12031.                       contain the number of buttons on the mouse (BX
  12032.                       register), as follows:
  12033.   
  12034.                            -1 = 2 buttons
  12035.                             3 = Mouse Systems mouse
  12036.                             0 = other than 2 buttons
  12037.   
  12038.   Return value        returns TRUE if a mouse is installed, FALSE
  12039.                       otherwise.
  12040.   
  12041.   Note                This function will also reset the mouse if one is
  12042.                       installed.
  12043.   
  12044.   See also            MGetVerType(), MouseReset()
  12045.   
  12046.   Example             #include <mousehk.h>
  12047.   
  12048.                       main()
  12049.                       {
  12050.                            extern int _mouse2;
  12051.   
  12052.                            printf("mouse: ");
  12053.                            if (ismouse())
  12054.                                 switch (_mouse2) {
  12055.                                      case -1: printf("2 buttons");
  12056.                                      case 3: printf("Mouse Systems");
  12057.                                      case 0: printf("!= 2 buttons (3?)");
  12058.                                 }
  12059.                            else
  12060.                                 printf("not installed");
  12061.                       }
  12062.   
  12063.   
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.  
  12076.  
  12077.  
  12078.  
  12079.  
  12080.  
  12081.  
  12082.  
  12083.  
  12084.      TCHK 2.1                                                    Page 184
  12085.  
  12086.   
  12087.   Function             isNetwork - is a network installed
  12088.   
  12089.   Syntax              boolean isNetwork(void);
  12090.   
  12091.   Prototype in        network.h
  12092.   
  12093.   Remarks             checks if a network is installed.
  12094.   
  12095.   Return value        returns TRUE if a network is installed, FALSE
  12096.                       otherwise.
  12097.   
  12098.   Note                this function requires DOS 3.1+
  12099.   
  12100.   Example             #include <network.h>
  12101.   
  12102.                       main()
  12103.                       {
  12104.                            printf("A network is ");
  12105.                            if (! isNetwork())
  12106.                                 printf("not ");
  12107.                            printf("installed\n");
  12108.                       }
  12109.   
  12110.  
  12111.  
  12112.  
  12113.  
  12114.  
  12115.  
  12116.  
  12117.  
  12118.  
  12119.  
  12120.  
  12121.  
  12122.  
  12123.  
  12124.  
  12125.  
  12126.  
  12127.  
  12128.  
  12129.  
  12130.  
  12131.  
  12132.  
  12133.  
  12134.  
  12135.  
  12136.  
  12137.  
  12138.  
  12139.  
  12140.  
  12141.  
  12142.  
  12143.  
  12144.  
  12145.  
  12146.  
  12147.  
  12148.  
  12149.  
  12150.      TCHK 2.1                                                    Page 185
  12151.  
  12152.   
  12153.   Function             isNLSFuncCom - is NLSFUNC.COM installed
  12154.   
  12155.   Syntax              unsigned char isNLSFuncCom(void);
  12156.   
  12157.   Prototype in        doshk.h
  12158.   
  12159.   Remarks             checks if NLSFUNC.COM is installed.
  12160.   
  12161.   Return value        returns one of the following values:
  12162.   
  12163.                            0x00 - not installed, OK to install
  12164.                            0x01 - not installed, not OK to install
  12165.                            0xFF - installed
  12166.   
  12167.   Example             #include <doshk.h>
  12168.   
  12169.                       main()
  12170.                       {
  12171.                            printf("NLSFUNC.COM is ");
  12172.                            if (isNLSFuncCom() != 0xFF)
  12173.                                 printf("not ");
  12174.                            printf("installed\n");
  12175.                       }
  12176.   
  12177.   
  12178.  
  12179.  
  12180.  
  12181.  
  12182.  
  12183.  
  12184.  
  12185.  
  12186.  
  12187.  
  12188.  
  12189.  
  12190.  
  12191.  
  12192.  
  12193.  
  12194.  
  12195.  
  12196.  
  12197.  
  12198.  
  12199.  
  12200.  
  12201.  
  12202.  
  12203.  
  12204.  
  12205.  
  12206.  
  12207.  
  12208.  
  12209.  
  12210.  
  12211.  
  12212.  
  12213.  
  12214.  
  12215.  
  12216.      TCHK 2.1                                                    Page 186
  12217.  
  12218.   
  12219.   Function             isNovellNetavail - is Novell Network installed
  12220.   
  12221.   Syntax              boolean isNovellNetavail(void);
  12222.   
  12223.   Prototype in        network.h
  12224.   
  12225.   Remarks             checks if a Novell network is installed.
  12226.   
  12227.   Return value        returns TRUE if a Novell network is installed,
  12228.                       FALSE otherwise.
  12229.   
  12230.   Example             #include <network.h>
  12231.   
  12232.                       main()
  12233.                       {
  12234.                            printf("Novell network is ");
  12235.                            if (! isNovellNetavail())
  12236.                                 printf("not ");
  12237.                            printf("installed\n");
  12238.                       }
  12239.   
  12240.  
  12241.  
  12242.  
  12243.  
  12244.  
  12245.  
  12246.  
  12247.  
  12248.  
  12249.  
  12250.  
  12251.  
  12252.  
  12253.  
  12254.  
  12255.  
  12256.  
  12257.  
  12258.  
  12259.  
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.  
  12270.  
  12271.  
  12272.  
  12273.  
  12274.  
  12275.  
  12276.  
  12277.  
  12278.  
  12279.  
  12280.  
  12281.  
  12282.      TCHK 2.1                                                    Page 187
  12283.  
  12284.   
  12285.   Function             isodd - is a number odd
  12286.   
  12287.   Syntax              #include <mathhk.h>
  12288.                       (boolean) isodd(x)
  12289.   
  12290.   Prototype in        mathhk.h
  12291.   
  12292.   Remarks             isodd checks if x is odd (not evenly divisible by
  12293.                       2).
  12294.   
  12295.                       This function is a macro.
  12296.   
  12297.   Return value        returns TRUE if x is odd, otherwise FALSE.
  12298.   
  12299.   See also            iseven()
  12300.   
  12301.   
  12302.  
  12303.  
  12304.  
  12305.  
  12306.  
  12307.  
  12308.  
  12309.  
  12310.  
  12311.  
  12312.  
  12313.  
  12314.  
  12315.  
  12316.  
  12317.  
  12318.  
  12319.  
  12320.  
  12321.  
  12322.  
  12323.  
  12324.  
  12325.  
  12326.  
  12327.  
  12328.  
  12329.  
  12330.  
  12331.  
  12332.  
  12333.  
  12334.  
  12335.  
  12336.  
  12337.  
  12338.  
  12339.  
  12340.  
  12341.  
  12342.  
  12343.  
  12344.  
  12345.  
  12346.  
  12347.  
  12348.      TCHK 2.1                                                    Page 188
  12349.  
  12350.   
  12351.   Function             ispathname - character classification
  12352.   
  12353.   Syntax              boolean ispathname(int c);
  12354.   
  12355.   Prototype in        keyboard.h
  12356.   
  12357.   Remarks             determines if a character is valid for a DOS
  12358.                       pathname. The following characters are NOT allowed:
  12359.   
  12360.                            ;  ,  =  +  tab  space  <  >  |  /  "  [  ]
  12361.   
  12362.   Return value        returns true if c is a valid DOS pathname
  12363.                       character, FALSE otherwise.
  12364.   
  12365.   Note                This function checks if a character is legal for a
  12366.                       DOS pathname. Use isfilename() to check for a valid
  12367.                       DOS filename.ext character.
  12368.   
  12369.   See also            isfilename()
  12370.   
  12371.   
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.  
  12379.  
  12380.  
  12381.  
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.  
  12388.  
  12389.  
  12390.  
  12391.  
  12392.  
  12393.  
  12394.  
  12395.  
  12396.  
  12397.  
  12398.  
  12399.  
  12400.  
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406.  
  12407.  
  12408.  
  12409.  
  12410.  
  12411.  
  12412.  
  12413.  
  12414.      TCHK 2.1                                                    Page 189
  12415.  
  12416.   
  12417.   Function             ispcAnywhere - is pcAnywhere installed
  12418.   
  12419.   Syntax              boolean ispcAnywhere(void);
  12420.   
  12421.   Prototype in        doshk.h
  12422.   
  12423.   Remarks             determines if pcAnywhere is installed.
  12424.   
  12425.   Return value        returns TRUE if pcAnywhere is installed, FALSE
  12426.                       otherwise.
  12427.   
  12428.   See also            SetpcAnywhere()
  12429.   
  12430.   Example             #include <doshk.h>
  12431.   
  12432.                       main()
  12433.                       {
  12434.                            printf("pcAnywhere is ");
  12435.                            if (! ispcAnywhere())
  12436.                                 printf("not ");
  12437.                            printf("installed\n");
  12438.                       }
  12439.   
  12440.   
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.  
  12447.  
  12448.  
  12449.  
  12450.  
  12451.  
  12452.  
  12453.  
  12454.  
  12455.  
  12456.  
  12457.  
  12458.  
  12459.  
  12460.  
  12461.  
  12462.  
  12463.  
  12464.  
  12465.  
  12466.  
  12467.  
  12468.  
  12469.  
  12470.  
  12471.  
  12472.  
  12473.  
  12474.  
  12475.  
  12476.  
  12477.  
  12478.  
  12479.  
  12480.      TCHK 2.1                                                    Page 190
  12481.  
  12482.   
  12483.   Function             isPRINTavail - is PRINT.COM installed
  12484.   
  12485.   Syntax              int isPRINTavail(void);
  12486.   
  12487.   Prototype in        printhk.h
  12488.   
  12489.   Remarks             detects if PRINT.COM is installed.
  12490.   
  12491.   Return value        returns PRINT_ERROR if DOS 3.1 or greater is not
  12492.                       being used, otherwise returns PRINT_OK, PRINT_NOOK
  12493.                       or PRINT_INSTALLED, depending on the current
  12494.                       status.
  12495.   
  12496.   Note                requires DOS 3.1 or greater.
  12497.   
  12498.   See also            PRINTadd(), PRINThold(), PRINTpurge(),
  12499.                       PRINTremove(), PRINTresume
  12500.   
  12501.   
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515.  
  12516.  
  12517.  
  12518.  
  12519.  
  12520.  
  12521.  
  12522.  
  12523.  
  12524.  
  12525.  
  12526.  
  12527.  
  12528.  
  12529.  
  12530.  
  12531.  
  12532.  
  12533.  
  12534.  
  12535.  
  12536.  
  12537.  
  12538.  
  12539.  
  12540.  
  12541.  
  12542.  
  12543.  
  12544.  
  12545.  
  12546.      TCHK 2.1                                                    Page 191
  12547.  
  12548.   
  12549.   Function             isPM - the the hour AM or PM
  12550.   
  12551.   Syntax              #include <timehk.h>
  12552.                       (boolean) isPM(hr)
  12553.   
  12554.   Prototype in        timehk.h
  12555.   
  12556.   Remarks             determines if hr in 24-hour army time is AM or PM.
  12557.   
  12558.   Return value        returns TRUE if hr is noon (12) or later or FALSE
  12559.                       if hr is AM.
  12560.   
  12561.   See also            time_convert(), to24hour(), tohour()
  12562.   
  12563.   
  12564.  
  12565.  
  12566.  
  12567.  
  12568.  
  12569.  
  12570.  
  12571.  
  12572.  
  12573.  
  12574.  
  12575.  
  12576.  
  12577.  
  12578.  
  12579.  
  12580.  
  12581.  
  12582.  
  12583.  
  12584.  
  12585.  
  12586.  
  12587.  
  12588.  
  12589.  
  12590.  
  12591.  
  12592.  
  12593.  
  12594.  
  12595.  
  12596.  
  12597.  
  12598.  
  12599.  
  12600.  
  12601.  
  12602.  
  12603.  
  12604.  
  12605.  
  12606.  
  12607.  
  12608.  
  12609.  
  12610.  
  12611.  
  12612.      TCHK 2.1                                                    Page 192
  12613.  
  12614.   
  12615.   Function             isrealtimeclock - is a real time clock installed
  12616.   
  12617.   Syntax              int isrealtimeclock(void);
  12618.   
  12619.   Prototype in        ibm.h
  12620.   
  12621.   Remarks             isrealtimeclock() detects if a real time clock is
  12622.                       installed.
  12623.   
  12624.   Return value        returns 1 if a real time clock is installed, 0 if
  12625.                       it is not, and -1 if this function is not
  12626.                       supported.
  12627.   
  12628.   Note                the 1/10/86 XT BIOS returns an incorrect value for
  12629.                       this function, so if the machine is an IBM XT or
  12630.                       compatible with a BIOS date of 1/10/86, do not use
  12631.                       this function.
  12632.   
  12633.   Example             #include <ibm.h>
  12634.   
  12635.                       main()
  12636.                       {
  12637.                            printf("real time clock: ");
  12638.                            switch (isrealtimeclock()) {
  12639.                                 case -1: printf("Error");  break;
  12640.                                 case  0: printf("No");  break;
  12641.                                 case  1: printf("Yes");  break;
  12642.                       }
  12643.   
  12644.   
  12645.  
  12646.  
  12647.  
  12648.  
  12649.  
  12650.  
  12651.  
  12652.  
  12653.  
  12654.  
  12655.  
  12656.  
  12657.  
  12658.  
  12659.  
  12660.  
  12661.  
  12662.  
  12663.  
  12664.  
  12665.  
  12666.  
  12667.  
  12668.  
  12669.  
  12670.  
  12671.  
  12672.  
  12673.  
  12674.  
  12675.  
  12676.  
  12677.  
  12678.      TCHK 2.1                                                    Page 193
  12679.  
  12680.   
  12681.   Function             isRedirectStdin - is stdin redirected
  12682.   
  12683.   Syntax              boolean isRedirectStdin(void);
  12684.   
  12685.   Prototype in        doshhk.h
  12686.   
  12687.   Remarks             isRedirectStdin() detects if standard input (stdin)
  12688.                       is redirected.
  12689.   
  12690.   Return value        isRedirectStdin returns TRUE if standard input
  12691.                       (stdin) is redirected, FALSE otherwise.
  12692.   
  12693.   See also            iscdevicemoderaw(), isdrivelocal(),
  12694.                       ishandlelocal(), isRedirectStdout(),
  12695.                       isremoveable(), setcdevicemode()
  12696.   
  12697.   
  12698.  
  12699.  
  12700.  
  12701.  
  12702.  
  12703.  
  12704.  
  12705.  
  12706.  
  12707.  
  12708.  
  12709.  
  12710.  
  12711.  
  12712.  
  12713.  
  12714.  
  12715.  
  12716.  
  12717.  
  12718.  
  12719.  
  12720.  
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743.  
  12744.      TCHK 2.1                                                    Page 194
  12745.  
  12746.   
  12747.   Function             isRedirectStdout - is stdout redirected
  12748.   
  12749.   Syntax              boolean isRedirectStdout(void);
  12750.   
  12751.   Prototype in        doshhk.h
  12752.   
  12753.   Remarks             isRedirectStdout() detects if standard output
  12754.                       (stdout) is redirected.
  12755.   
  12756.   Return value        isRedirectStdout returns TRUE if standard output
  12757.                       (stdout) is redirected, FALSE otherwise.
  12758.   
  12759.   See also            iscdevicemoderaw(), isdrivelocal(),
  12760.                       ishandlelocal(), isRedirectStdin(), isremoveable(),
  12761.                       setcdevicemode()
  12762.   
  12763.   
  12764.  
  12765.  
  12766.  
  12767.  
  12768.  
  12769.  
  12770.  
  12771.  
  12772.  
  12773.  
  12774.  
  12775.  
  12776.  
  12777.  
  12778.  
  12779.  
  12780.  
  12781.  
  12782.  
  12783.  
  12784.  
  12785.  
  12786.  
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.  
  12803.  
  12804.  
  12805.  
  12806.  
  12807.  
  12808.  
  12809.  
  12810.      TCHK 2.1                                                    Page 195
  12811.  
  12812.   
  12813.   Function             isremoveable - is device removeable
  12814.   
  12815.   Syntax              int isremovable(char drive);
  12816.   
  12817.   Prototype in        doshhk.h
  12818.   
  12819.   Remarks             isremoveable() detects if a device determined by
  12820.                       drive, where 0=default, 1=A, 2=B, etc. is
  12821.                       removeable (i.e. Bernouli boxes) or fixed (i.e.
  12822.                       hard drives).
  12823.   
  12824.                       isremoveable requires DOS 3.x+
  12825.   
  12826.   Return value        isremoveable returns:
  12827.   
  12828.                             0:  removeable
  12829.                             1:  fixed
  12830.                            15:  invalid drive
  12831.                            -1:  error
  12832.   
  12833.                       If there was an error, Borland's variable errno
  12834.                       will contain the error code.
  12835.   
  12836.   See also            iscdevicemoderaw(), isdrivelocal(),
  12837.                       ishandlelocal(), isRedirectStdin(),
  12838.                       isRedirectStdout(), setcdevicemode()
  12839.   
  12840.   
  12841.  
  12842.  
  12843.  
  12844.  
  12845.  
  12846.  
  12847.  
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.  
  12860.  
  12861.  
  12862.  
  12863.  
  12864.  
  12865.  
  12866.  
  12867.  
  12868.  
  12869.  
  12870.  
  12871.  
  12872.  
  12873.  
  12874.  
  12875.  
  12876.      TCHK 2.1                                                    Page 196
  12877.  
  12878.   
  12879.   Function             isScrnSav2 - is SCRNSAV2.COM by Alan Ballard
  12880.                                      installed
  12881.   
  12882.   Syntax              boolean isScrnSav2(void);
  12883.   
  12884.   Prototype in        doshk.h
  12885.   
  12886.   Remarks             checks if ScrnSav2.COM is installed (screen saver
  12887.                       for PS/2s w/VGA by Alan Ballard)
  12888.   
  12889.   Return value        returns TRUE if SCRNSAV2.COM is installed, FALSE
  12890.                       otherwise.
  12891.   
  12892.   Example             #include <doshk.h>
  12893.   
  12894.                       main()
  12895.                       {
  12896.                            printf("ScrnSav2 is ");
  12897.                            if (! isScrnSav2())
  12898.                                 printf("not ");
  12899.                            printf("installed\n");
  12900.                       }
  12901.   
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.  
  12923.  
  12924.  
  12925.  
  12926.  
  12927.  
  12928.  
  12929.  
  12930.  
  12931.  
  12932.  
  12933.  
  12934.  
  12935.  
  12936.  
  12937.  
  12938.  
  12939.  
  12940.  
  12941.  
  12942.      TCHK 2.1                                                    Page 197
  12943.  
  12944.   
  12945.   Function             isShareavail - is SHARE installed
  12946.   
  12947.   Syntax              boolean isShareavail(void);
  12948.   
  12949.   Prototype in        doshk.h
  12950.   
  12951.   Remarks             checks if SHARE is installed.
  12952.   
  12953.   Return value        returns TRUE if SHARE is installed, FALSE
  12954.                       otherwise.
  12955.   
  12956.   See also            isAppendavail(), isAssignAvail()
  12957.   
  12958.   Example             #include <ibm.h>
  12959.   
  12960.                       main()
  12961.                       {
  12962.                            printf("SHARE is ");
  12963.                            if (! isShareavail())
  12964.                                 printf("not ");
  12965.                            printf("installed\n");
  12966.                       }
  12967.   
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.  
  12978.  
  12979.  
  12980.  
  12981.  
  12982.  
  12983.  
  12984.  
  12985.  
  12986.  
  12987.  
  12988.  
  12989.  
  12990.  
  12991.  
  12992.  
  12993.  
  12994.  
  12995.  
  12996.  
  12997.  
  12998.  
  12999.  
  13000.  
  13001.  
  13002.  
  13003.  
  13004.  
  13005.  
  13006.  
  13007.  
  13008.      TCHK 2.1                                                    Page 198
  13009.  
  13010.   
  13011.   Function             isstate - is string a state abbreviation
  13012.   
  13013.   Syntax              boolean isstate(char *state);
  13014.   
  13015.   Prototype in        statehk.h
  13016.   
  13017.   Remarks             isstate() looks up the state abbreviation given in
  13018.                       States[]. The search is case independent
  13019.   
  13020.   Return value        returns TRUE if found, otherwise FALSE.
  13021.   
  13022.   Note                in addition to the 50 states, the following are
  13023.                       also recognized:
  13024.   
  13025.                            CZ   - Canal Zone
  13026.                            DC   - District of Columbia
  13027.                            GU   - Guam
  13028.                            PR   - Puerto Rico
  13029.                            VI   - Virgin Islands
  13030.   
  13031.   See also            statehk.h
  13032.                       iszip(), stateindex()
  13033.   
  13034.   Example             #include <statehk.h>
  13035.   
  13036.                       {
  13037.                            printf("AL is ");
  13038.                            if (!isstate("AL"))
  13039.                                 printf("NOT ");
  13040.                            printf("a valid state abbreviation\n");
  13041.                       }
  13042.   
  13043.   Program output      AL is a valid state abbreviation
  13044.   
  13045.   
  13046.  
  13047.  
  13048.  
  13049.  
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.  
  13059.  
  13060.  
  13061.  
  13062.  
  13063.  
  13064.  
  13065.  
  13066.  
  13067.  
  13068.  
  13069.  
  13070.  
  13071.  
  13072.  
  13073.  
  13074.      TCHK 2.1                                                    Page 199
  13075.  
  13076.   
  13077.   Function             isVERIFYon - check VERIFY flag
  13078.   
  13079.   Syntax              #include <ibm.h>
  13080.                       isVERIFYon()
  13081.   
  13082.   Prototype in        ibm.h
  13083.   
  13084.   Remarks             checks the state of the verify flag. The VERIFY
  13085.                       status flag can be set from DOS by VERIFY ON or
  13086.                       VERIFY OFF.
  13087.   
  13088.                       This function is a macro.
  13089.   
  13090.   Return value        returns TRUE if the verify flag is on, FALSE if the
  13091.                       flag is off.
  13092.   
  13093.   See also            isBREAKon(), setBREAK(), setVERIFY()
  13094.   
  13095.   Example             #include <ibm.h>
  13096.   
  13097.                       main()
  13098.                       {
  13099.                            printf("VERIFY flag is ");
  13100.                            if (! isVERIFYon())
  13101.                                 printf("not ");
  13102.                            printf("on\n");
  13103.                       }
  13104.   
  13105.  
  13106.  
  13107.  
  13108.  
  13109.  
  13110.  
  13111.  
  13112.  
  13113.  
  13114.  
  13115.  
  13116.  
  13117.  
  13118.  
  13119.  
  13120.  
  13121.  
  13122.  
  13123.  
  13124.  
  13125.  
  13126.  
  13127.  
  13128.  
  13129.  
  13130.  
  13131.  
  13132.  
  13133.  
  13134.  
  13135.  
  13136.  
  13137.  
  13138.  
  13139.  
  13140.      TCHK 2.1                                                    Page 200
  13141.  
  13142.   
  13143.   Function             isVidclock - is VIDCLOCK.COM by Tom Hanlin
  13144.                                      installed
  13145.   
  13146.   Syntax              boolean isVidclock(void);
  13147.   
  13148.   Prototype in        doshk.h
  13149.   
  13150.   Remarks             checks if VIDCLOCK.COM by Tom Hanlin is installed.
  13151.   
  13152.   Return value        returns TRUE if VIDCLOCK.COM is installed, FALSE
  13153.                       otherwise.
  13154.   
  13155.   Example             #include <doshk.h>
  13156.   
  13157.                       main()
  13158.                       {
  13159.                            printf("VidClock is ");
  13160.                            if (! isVidclock())
  13161.                                 printf("not ");
  13162.                            printf("installed\n");
  13163.                       }
  13164.   
  13165.  
  13166.  
  13167.  
  13168.  
  13169.  
  13170.  
  13171.  
  13172.  
  13173.  
  13174.  
  13175.  
  13176.  
  13177.  
  13178.  
  13179.  
  13180.  
  13181.  
  13182.  
  13183.  
  13184.  
  13185.  
  13186.  
  13187.  
  13188.  
  13189.  
  13190.  
  13191.  
  13192.  
  13193.  
  13194.  
  13195.  
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.  
  13205.  
  13206.      TCHK 2.1                                                    Page 201
  13207.  
  13208.   
  13209.   Function             isWhoa - is WHOA!.COM by Brad Crandall installed
  13210.   
  13211.   Syntax              boolean isWhoa(void);
  13212.   
  13213.   Prototype in        doshk.h
  13214.   
  13215.   Remarks             checks if WHOA!.COM is installed (system slow-down
  13216.                       utility by Brad Crandall).
  13217.   
  13218.   Return value        returns TRUE if WHOA!.COM is installed, FALSE
  13219.                       otherwise.
  13220.   
  13221.   See also            setWhoa(), uninstallWhoa()
  13222.   
  13223.   Example             #include <doshk.h>
  13224.   
  13225.                       main()
  13226.                       {
  13227.                            printf("Whoa! is ");
  13228.                            if (! isWhoa())
  13229.                                 printf("not ");
  13230.                            printf("installed\n");
  13231.                       }
  13232.   
  13233.  
  13234.  
  13235.  
  13236.  
  13237.  
  13238.  
  13239.  
  13240.  
  13241.  
  13242.  
  13243.  
  13244.  
  13245.  
  13246.  
  13247.  
  13248.  
  13249.  
  13250.  
  13251.  
  13252.  
  13253.  
  13254.  
  13255.  
  13256.  
  13257.  
  13258.  
  13259.  
  13260.  
  13261.  
  13262.  
  13263.  
  13264.  
  13265.  
  13266.  
  13267.  
  13268.  
  13269.  
  13270.  
  13271.  
  13272.      TCHK 2.1                                                    Page 202
  13273.  
  13274.   
  13275.   Function             iswildcarded - checks a string for DOS wildcards
  13276.   
  13277.   Syntax              boolean iswildcarded(char *str);
  13278.   
  13279.   Prototype in        stringhk.h
  13280.   
  13281.   Remarks             checks if the DOS wildcard characters *,? are
  13282.                       contained in str.
  13283.   
  13284.   Return value        returns TRUE * or ? is in str, FALSE otherwise.
  13285.   
  13286.   Example             #include <stringhk.h>
  13287.   
  13288.                       main()
  13289.                       {
  13290.                            char filename[] = "TCHK*.LIB";
  13291.   
  13292.                            printf("%s is ",filename);
  13293.                            if (!iswildcarded(filename))
  13294.                                 printf("NOT ");
  13295.                            printf("wildcarded");
  13296.   
  13297.                       }
  13298.   
  13299.   Program output      TCHK*.LIB is wildcarded
  13300.   
  13301.   
  13302.  
  13303.  
  13304.  
  13305.  
  13306.  
  13307.  
  13308.  
  13309.  
  13310.  
  13311.  
  13312.  
  13313.  
  13314.  
  13315.  
  13316.  
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.  
  13331.  
  13332.  
  13333.  
  13334.  
  13335.  
  13336.  
  13337.  
  13338.      TCHK 2.1                                                    Page 203
  13339.  
  13340.   
  13341.   Function             isXMSinstalled - is XMS installed
  13342.   
  13343.   Syntax              boolean isXMSinstalled(void);
  13344.   
  13345.   Prototype in        doshk.h
  13346.   
  13347.   Remarks             checks if the eXtended Memory Specification driver
  13348.                       HIMEM.SYS or some compatibile is available. At this
  13349.                       time, HIMEM 2.06 is the latest version.
  13350.   
  13351.   Return value        returns TRUE if XMS is available, FALSE otherwise.
  13352.   
  13353.   Example             #include <doshk.h>
  13354.   
  13355.                       main()
  13356.                       {
  13357.                            printf("XMS is ");
  13358.                            if (! isXMSinstalled())
  13359.                                 printf("not ");
  13360.                            printf("installed\n");
  13361.                       }
  13362.   
  13363.  
  13364.  
  13365.  
  13366.  
  13367.  
  13368.  
  13369.  
  13370.  
  13371.  
  13372.  
  13373.  
  13374.  
  13375.  
  13376.  
  13377.  
  13378.  
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.  
  13391.  
  13392.  
  13393.  
  13394.  
  13395.  
  13396.  
  13397.  
  13398.  
  13399.  
  13400.  
  13401.  
  13402.  
  13403.  
  13404.      TCHK 2.1                                                    Page 204
  13405.  
  13406.   
  13407.   Function             iszip - is a zip code valid for a state
  13408.   
  13409.   Syntax              boolean iszip(char *state, char *zip);
  13410.   
  13411.   Prototype in        statehk.h
  13412.   
  13413.   Remarks             iszip() checks if a zip code is valid for the state
  13414.                       given by its abbreviation. See isstate for valid
  13415.                       state abbreviations.
  13416.   
  13417.                       Currently, iszip() requires the zip code to be a
  13418.                       string, which is internally converted to a long via
  13419.                       atol(). This was done to provide potential future
  13420.                       expansion to support non-numeric zip codes (i.e.
  13421.                       Canada, etc.) in the future.
  13422.   
  13423.   Return value        returns TRUE if the zip code is valid for the state
  13424.                       given. If the state abbreviation is not valid, or
  13425.                       the zip code is not valid for the state, FALSE is
  13426.                       returned.
  13427.   
  13428.   Note                For Canal Zone (CZ), any zip code will return as
  13429.                       valid. I could not determine the range of valid zip
  13430.                       codes for the Canal Zone.
  13431.   
  13432.   See also            statehk.h
  13433.                       isstate(), stateindex()
  13434.   
  13435.   Example             #include <statehk.h>
  13436.   
  13437.                       {
  13438.                            printf("11554 is ");
  13439.                            if (!iszip("NY","11554"))
  13440.                                 printf("NOT ");
  13441.                            printf("a valid zip code for NY\n");
  13442.                       }
  13443.   
  13444.   Program output      AL is a valid state abbreviation
  13445.   
  13446.   
  13447.  
  13448.  
  13449.  
  13450.  
  13451.  
  13452.  
  13453.  
  13454.  
  13455.  
  13456.  
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.  
  13467.  
  13468.  
  13469.  
  13470.      TCHK 2.1                                                    Page 205
  13471.  
  13472.   
  13473.   Function             joystickAx - read joystick input Ax
  13474.   
  13475.   Syntax              unsigned joystickAx(void);
  13476.   
  13477.   Prototype in        ibm.h
  13478.   
  13479.   Remarks             reads the joystick input Ax.
  13480.   
  13481.   Return value        returns the joystick input Ax.
  13482.   
  13483.   See also            isgameport(), joystickAy(), joystickBx(),
  13484.                       joystickBy(), joysticksettings()
  13485.   
  13486.   Example             #include <ibm.h>
  13487.   
  13488.                       main()
  13489.                       {
  13490.                            while (inkey(FALSE) == 0) {
  13491.                                 printf("Joystick Inputs\n");
  13492.                                 printf("A: (%u,%u)\n",joystickAx(),
  13493.                                        joystickAy());
  13494.                                 printf("B: (%u,%u)\n",joystickBx(),
  13495.                                        joystickBy());
  13496.                            }
  13497.                       }
  13498.   
  13499.   Program output      continuously polls joystick inputs and displays
  13500.                       their values until a key is pressed.
  13501.   
  13502.   
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.  
  13509.  
  13510.  
  13511.  
  13512.  
  13513.  
  13514.  
  13515.  
  13516.  
  13517.  
  13518.  
  13519.  
  13520.  
  13521.  
  13522.  
  13523.  
  13524.  
  13525.  
  13526.  
  13527.  
  13528.  
  13529.  
  13530.  
  13531.  
  13532.  
  13533.  
  13534.  
  13535.  
  13536.      TCHK 2.1                                                    Page 206
  13537.  
  13538.   
  13539.   Function             joystickAy - read joystick input Ay
  13540.   
  13541.   Syntax              unsigned joystickAy(void);
  13542.   
  13543.   Prototype in        ibm.h
  13544.   
  13545.   Remarks             reads the joystick input Ay.
  13546.   
  13547.   Return value        returns the joystick input Ay.
  13548.   
  13549.   See also            isgameport(), joystickAx(), joystickBx(),
  13550.                       joystickBy(), joysticksettings()
  13551.   
  13552.   Example             See joystickAx().
  13553.   
  13554.   
  13555.  
  13556.  
  13557.  
  13558.  
  13559.  
  13560.  
  13561.  
  13562.  
  13563.  
  13564.  
  13565.  
  13566.  
  13567.  
  13568.  
  13569.  
  13570.  
  13571.  
  13572.  
  13573.  
  13574.  
  13575.  
  13576.  
  13577.  
  13578.  
  13579.  
  13580.  
  13581.  
  13582.  
  13583.  
  13584.  
  13585.  
  13586.  
  13587.  
  13588.  
  13589.  
  13590.  
  13591.  
  13592.  
  13593.  
  13594.  
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.      TCHK 2.1                                                    Page 207
  13603.  
  13604.   
  13605.   Function             joystickBx - read joystick input Bx
  13606.   
  13607.   Syntax              unsigned joystickBx(void);
  13608.   
  13609.   Prototype in        ibm.h
  13610.   
  13611.   Remarks             reads the joystick input Bx.
  13612.   
  13613.   Return value        returns the joystick input Bx.
  13614.   
  13615.   See also            isgameport(), joystickAx(), joystickAy(),
  13616.                       joystickBy(), joysticksettings()
  13617.   
  13618.   Example             See joystickAx().
  13619.   
  13620.   
  13621.  
  13622.  
  13623.  
  13624.  
  13625.  
  13626.  
  13627.  
  13628.  
  13629.  
  13630.  
  13631.  
  13632.  
  13633.  
  13634.  
  13635.  
  13636.  
  13637.  
  13638.  
  13639.  
  13640.  
  13641.  
  13642.  
  13643.  
  13644.  
  13645.  
  13646.  
  13647.  
  13648.  
  13649.  
  13650.  
  13651.  
  13652.  
  13653.  
  13654.  
  13655.  
  13656.  
  13657.  
  13658.  
  13659.  
  13660.  
  13661.  
  13662.  
  13663.  
  13664.  
  13665.  
  13666.  
  13667.  
  13668.      TCHK 2.1                                                    Page 208
  13669.  
  13670.   
  13671.   Function             joystickBy - read joystick input By
  13672.   
  13673.   Syntax              unsigned joystickBy(void);
  13674.   
  13675.   Prototype in        ibm.h
  13676.   
  13677.   Remarks             reads the joystick input By.
  13678.   
  13679.   Return value        returns the joystick input By.
  13680.   
  13681.   See also            isgameport(), joystickAx(), joystickAy(),
  13682.                       joystickBx(), joysticksettings()
  13683.   
  13684.   Example             See joystickAx().
  13685.   
  13686.   
  13687.  
  13688.  
  13689.  
  13690.  
  13691.  
  13692.  
  13693.  
  13694.  
  13695.  
  13696.  
  13697.  
  13698.  
  13699.  
  13700.  
  13701.  
  13702.  
  13703.  
  13704.  
  13705.  
  13706.  
  13707.  
  13708.  
  13709.  
  13710.  
  13711.  
  13712.  
  13713.  
  13714.  
  13715.  
  13716.  
  13717.  
  13718.  
  13719.  
  13720.  
  13721.  
  13722.  
  13723.  
  13724.  
  13725.  
  13726.  
  13727.  
  13728.  
  13729.  
  13730.  
  13731.  
  13732.  
  13733.  
  13734.      TCHK 2.1                                                    Page 209
  13735.  
  13736.   
  13737.   Function             joysticksettings - read joystick switch settings
  13738.   
  13739.   Syntax              char joysticksettings(void);
  13740.   
  13741.   Prototype in        ibm.h
  13742.   
  13743.   Remarks             reads the joystick switch settings.
  13744.   
  13745.   Return value        returns the joystick switch settings.
  13746.   
  13747.   See also            isgameport(), joystickAx(), joystickAy(),
  13748.                       joystickBx(), joystickBy()
  13749.   
  13750.   
  13751.  
  13752.  
  13753.  
  13754.  
  13755.  
  13756.  
  13757.  
  13758.  
  13759.  
  13760.  
  13761.  
  13762.  
  13763.  
  13764.  
  13765.  
  13766.  
  13767.  
  13768.  
  13769.  
  13770.  
  13771.  
  13772.  
  13773.  
  13774.  
  13775.  
  13776.  
  13777.  
  13778.  
  13779.  
  13780.  
  13781.  
  13782.  
  13783.  
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.  
  13799.  
  13800.      TCHK 2.1                                                    Page 210
  13801.  
  13802.   
  13803.   Function           Jul... - family of Julian date conversion
  13804.                                functions
  13805.   
  13806.   Syntax            double JultoCal(double jul);
  13807.                     double JultoCalCent(double jul);
  13808.                     char *JultoGreg(double jul);
  13809.                     char *JultoGregEuro(double jul);
  13810.                     char *JultoGregJap(double jul);
  13811.                     struct ddate *Jultoddate(double jul);
  13812.   
  13813.                     double JulAtoCal(double jul);
  13814.                     double JulAtoCalCent(double jul);
  13815.                     char *JulAtoGreg(double jul);
  13816.                     char *JulAtoGregEuro(double jul);
  13817.                     char *JulAtoGregJap(double jul);
  13818.                     struct ddate *JulAtoddate(double jul);
  13819.   
  13820.                     double JulBtoCal(double jul);
  13821.                     double JulBtoCalCent(double jul);
  13822.                     char *JulBtoGreg(double jul);
  13823.                     char *JulBtoGregEuro(double jul);
  13824.                     char *JulBtoGregJap(double jul);
  13825.                     struct ddate *JulBtoddate(double jul);
  13826.   
  13827.   Prototype in      datehk.h
  13828.   
  13829.   Remarks           Jul.toCal      converts a Julian date to Calendar
  13830.                                    date
  13831.                     Jul.toCalCent  converts a Julian date to Calendar
  13832.                                    date (w/century)
  13833.                     Jul.toGreg...  converts a Julian date to the
  13834.                                    appropraite Gregorian date
  13835.                     Jul.toddate    converts a Julian date to struct ddate
  13836.   
  13837.   Return value      Jul.toCal return a Calendar date
  13838.                     Jul.toCalCent return a Calendar date (w/century)
  13839.                     Jul.toGreg.. return the appropriate Gregorian date
  13840.                     Jul.toddate return a struct ddate
  13841.   
  13842.   See also          Appendix A
  13843.                     Cal...(), date_convert(), ddatetofull(),
  13844.                     ddatetoshort(), ddatetostr(), fulltoddate(),
  13845.                     Greg...(), monthexpand(), shorttoddate(),
  13846.                     strtoddate()
  13847.   
  13848.   Example           see demodate.c
  13849.   
  13850.  
  13851.  
  13852.  
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.  
  13863.  
  13864.  
  13865.  
  13866.      TCHK 2.1                                                    Page 211
  13867.  
  13868.   
  13869.   Function             keyclick - turn on key click
  13870.   
  13871.   Syntax              void keyclick(boolean on);
  13872.   
  13873.   Prototype in        keyboard.h
  13874.   
  13875.   Remarks             keyclick() will enable or disable key clicking
  13876.                       depending on the value of the parameter on.
  13877.   
  13878.   Return value        nothing.
  13879.   
  13880.   Note                This function only works on the PC Convertible and
  13881.                       PCjr.
  13882.   
  13883.   
  13884.  
  13885.  
  13886.  
  13887.  
  13888.  
  13889.  
  13890.  
  13891.  
  13892.  
  13893.  
  13894.  
  13895.  
  13896.  
  13897.  
  13898.  
  13899.  
  13900.  
  13901.  
  13902.  
  13903.  
  13904.  
  13905.  
  13906.  
  13907.  
  13908.  
  13909.  
  13910.  
  13911.  
  13912.  
  13913.  
  13914.  
  13915.  
  13916.  
  13917.  
  13918.  
  13919.  
  13920.  
  13921.  
  13922.  
  13923.  
  13924.  
  13925.  
  13926.  
  13927.  
  13928.  
  13929.  
  13930.  
  13931.  
  13932.      TCHK 2.1                                                    Page 212
  13933.  
  13934.   
  13935.   Function             leftstr - return the left portion of a string
  13936.   
  13937.   Syntax              char *leftstr(char *source, int len);
  13938.   
  13939.   Prototype in        stringhk.h
  13940.   
  13941.   Remarks             leftstr performs just like its BASIC counterpart
  13942.                       LEFT$().
  13943.   
  13944.                       leftstr returns the left part of a string.
  13945.   
  13946.   Return value        leftstr returns the leftmost len characters of
  13947.                       source. If the length of source is less than len,
  13948.                       the entire string is returned.
  13949.   
  13950.                       leftstr returns a pointer to the storage location
  13951.                       containing the new string, or NULL if space could
  13952.                       not be allocated.
  13953.   
  13954.   See also            midstr(), rightstr()
  13955.   
  13956.   Example             #include <stringhk.h>
  13957.                       #include <stdio.h>            /* for the printf */
  13958.   
  13959.                       main()
  13960.                       {
  13961.                            char msg[25], *l;
  13962.   
  13963.                            strcpy(msg,"This is another test");
  13964.                            l = leftstr(msg,7);
  13965.                            printf("%s\n",msg);
  13966.                            printf("%s\n",l);
  13967.                       }
  13968.   
  13969.   Program output      This is another test
  13970.                       This an
  13971.   
  13972.   
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.  
  13981.  
  13982.  
  13983.  
  13984.  
  13985.  
  13986.  
  13987.  
  13988.  
  13989.  
  13990.  
  13991.  
  13992.  
  13993.  
  13994.  
  13995.  
  13996.  
  13997.  
  13998.      TCHK 2.1                                                    Page 213
  13999.  
  14000.   
  14001.   Function             litebar_alloc - allocate memory for a litebar
  14002.                                         menu
  14003.   
  14004.   Syntax              struct litebar_header *litebar_alloc(int left, int
  14005.                                 top, int right, int bottom, char *frame,
  14006.                                 char *title, int titlejustify, int count,
  14007.                                 char *command[], int cmdleft[], int
  14008.                                 cmdright[], int cmdup[], int cmddown[],
  14009.                                 int cmdkey[], char cmdflag[], int cmdx[],
  14010.                                 int cmdy[], char *message[], int msgx,
  14011.                                 int msgy, int argq, int quitkey[], int
  14012.                                 colframe, int coltitle, int colnorm, int
  14013.                                 colcmdkey, int colhilite, int coldisable,
  14014.                                 int coldishilite, int colnotopt, int
  14015.                                 colmessage, int defaultcommand, unsigned
  14016.                                 flags);
  14017.   
  14018.   Prototype in        menuhk.h
  14019.   
  14020.   Remarks             litebar_alloc creates a litebar menu with the
  14021.                       following information:
  14022.   
  14023.                       Coordinates of the frame of the litebar menu are
  14024.                       (left,top) to (right,bottom), the border, if any,
  14025.                       is made up of the 9 or 11 chars in frame (0 to 8 or
  14026.                       10) as per boxwindow(), with an optional title on
  14027.                       the top edge of the menu border, justified left,
  14028.                       right or center (see howard.h for more details). If
  14029.                       frame == NULL  there will be no border. If
  14030.                       titlejustify = NONE there will be no title, or
  14031.                       pre-/post-title separators.
  14032.   
  14033.                       Unlike the popup menus, a count parameter is
  14034.                       required, specifiying how many commands there are.
  14035.                       The command array is a list of strings or text to
  14036.                       be displayed on the screen.
  14037.   
  14038.                       The cmdleft, cmdright, cmdup and cmddown parameters
  14039.                       are lists of where the respective key will move the
  14040.                       hilite bar. These values should correspond to an
  14041.                       index of the command[], with the exception noted
  14042.                       below. For example, if the hilite bar is on
  14043.                       command[0] and you wish the right arrow to move to
  14044.                       command[10], then cmdright[0] = 10. The exception
  14045.                       is when an arrow is to be disabled. Specifying a -1
  14046.                       as a direction element will disable that direction
  14047.                       for that command (i.e. at command[0] to make the
  14048.                       left arrow do nothing, then cmdleft[0] = -1.)
  14049.   
  14050.                       Each command can have a hotkey associated with it,
  14051.                       denoted by the appropriate cmdkey[]. The 'hotkey'
  14052.                       is actually a one-touch key, instantly moving to
  14053.                       and selecting a choice. The cmdkey value is an 
  14054.  
  14055.  
  14056.  
  14057.  
  14058.  
  14059.  
  14060.  
  14061.  
  14062.  
  14063.  
  14064.      TCHK 2.1                                                    Page 214
  14065.  
  14066.                       offset into the command string. For example, a
  14067.                       command "Edit" with a hotkey of the "E" would have
  14068.                       a cmdkey value of 0 (an offset from the beginning
  14069.                       of the command). A command without a hotkey has a
  14070.                       cmdkey value of -1.
  14071.   
  14072.                       Each command has an appropriate cmdflag field. A
  14073.                       command may be either:
  14074.   
  14075.                            ENABLED     - a valid choice
  14076.                            DISABLED    - displayed, but not selectable
  14077.                            NOTOPTION   - not a command (static text)
  14078.   
  14079.                       These are defined in menuhk.h. Other values may
  14080.                       cause unpredictable results.
  14081.   
  14082.                       The cmdx and cmdy arrays are lists of where the
  14083.                       commands should be displayed, respective to the
  14084.                       box. This is in a 'windowing' sense. If the box
  14085.                       coordinates are (10,10) to (20,20) and you wish
  14086.                       something to appear at the physical coordinates
  14087.                       (12,10) then (cmdx,cmdy) for the proper command
  14088.                       should be (2,0). This is an exception to the normal
  14089.                       coordinate system beginning at (1,1). In a litebar
  14090.                       menu, the 'border' is not excluded from the display
  14091.                       output and can be written over (this is true
  14092.                       regardless of whether or not a frame is displayed.)
  14093.   
  14094.                       TCHK litebar menus can display a message for each
  14095.                       command as it is hilited, much like Lotus style
  14096.                       menus. This message is optional, and if the
  14097.                       appropriate message[] is not NULL, it will be
  14098.                       displayed at (msgx,msgy). If the message[] element
  14099.                       is NULL, no message will be displayed. These
  14100.                       coordinates are relative to the menu coordinates,
  14101.                       just as cmdx and cmdy are.
  14102.   
  14103.                       A list of key codes that cause immediate return of
  14104.                       the user selection of the menu are in the quitkey
  14105.                       list, consisting of argq elements.
  14106.   
  14107.                       The following colors are used:
  14108.   
  14109.                            colframe       - frame around menu (if any)
  14110.                            coltitle       - title (if any)
  14111.                            colnorm        - enabled commands
  14112.                            colcmdkey      - hotkey in command
  14113.                            colhilite      - currently hilited option
  14114.                            coldisable     - disabled options
  14115.                            coldishilite   - disabled and currently
  14116.                                             hilited
  14117.                            colnotopt      - static text (NOTOPTION)
  14118.                            colmessage     - message (if any)
  14119.   
  14120.   
  14121.  
  14122.  
  14123.  
  14124.  
  14125.  
  14126.  
  14127.  
  14128.  
  14129.  
  14130.      TCHK 2.1                                                    Page 215
  14131.  
  14132.                       defaultcommand is the command initially hilited. If
  14133.                       an invalid command is chosen (the command is static
  14134.                       text, or does not exist, etc.) the first valid
  14135.                       command is the default.
  14136.   
  14137.                       flags is a 2-byte bit field of flags
  14138.   
  14139.                            QEFxxxxH UDIRCEDW
  14140.   
  14141.                       where
  14142.   
  14143.                            Q = Quit after selection
  14144.                            E = ESC means quit
  14145.                            F = Free memory on quit
  14146.                            H = Hierarchial menu (not implemented yet)
  14147.   
  14148.                            U = call _idle_menu() after keyboard input
  14149.                            D = free time slices under DESQview
  14150.                            I = cmdkeys are case Independent
  14151.                            R = Restore cursor before returning
  14152.                            C = don't hide Cursor
  14153.                            E = Erase menu on free/cleanup
  14154.                            D = Disabled not hiliteable
  14155.                            W = Wraparound
  14156.   
  14157.                       Briefly, Quit will restore the display to the state
  14158.                       it was in before the litebar menu was called
  14159.                       (settextinfo(), etc.). With E, if ESC is pressed
  14160.                       the menu is removed, for any other selection no
  14161.                       cleanup is done (unless Q is specified). Free
  14162.                       memory on quit calls litebar_free() after a
  14163.                       selection is made. Hierarchial menus are not
  14164.                       implemented yet. Keys are input via inkey(),
  14165.                       inkeyc(), inkeydv() or inkeycdv(), depending on
  14166.                       case Independency and freeeing time slices under
  14167.                       DESQview. When litebar_get() is called, the cursor
  14168.                       is hidden unless C is given. The cursor is unhidden
  14169.                       only if R is given. E will cause the menu to be
  14170.                       erased from the screen if quitting. Disabled
  14171.                       commands are normally selectable, unless D is on.
  14172.                       Wraparound allows the selecting hilite bar to wrap
  14173.                       over the top and under the bottom.
  14174.   
  14175.                       After input is polled, if the user defined function
  14176.                       flag is set (UDFIDLE) the function _idle_menu is
  14177.                       called. Currently, the definition of _idle_menu is:
  14178.   
  14179.                                 int _idle_menu(void)
  14180.   
  14181.                       Possible uses for such a function is an onscreen
  14182.                       clock, printing, or some other background task. In
  14183.                       the future _idle_menu() will receive releveant 
  14184.  
  14185.  
  14186.  
  14187.  
  14188.  
  14189.  
  14190.  
  14191.  
  14192.  
  14193.  
  14194.  
  14195.  
  14196.      TCHK 2.1                                                    Page 216
  14197.  
  14198.                       parameters. To define _idle_menu as the user
  14199.                       defined function int myfunction(void), try:
  14200.   
  14201.                            _idle_menu = (far *)myfunction;
  14202.   
  14203.                       The full definition for _idle_menu() is:
  14204.   
  14205.                            int (far *_idle_menu)(void);
  14206.   
  14207.                       You should declare myfunction() as type int, with
  14208.                       void parameters, and you should typecast the
  14209.                       function as a far pointer when you assign it to
  14210.                       _idle_menu.
  14211.   
  14212.   Return value        allocates and returns a pointer to a litebar header
  14213.                       structure if the menu was successfully created,
  14214.                       otherwise returns NULL if an error occurred.
  14215.                       litebarerrno will have the following values:
  14216.   
  14217.                            0    success
  14218.                            1    error, could not allocate litebar header
  14219.                            2    error, could not allocate videosave
  14220.                            3    error, could not allocate menusave
  14221.                            4    error, invalid title justification
  14222.                            5    error, could not allocate popup field
  14223.                            7    error, no menu item enabled (no commands)
  14224.                            8    error, could not allocate quit keylist
  14225.   
  14226.   Note                The litebar_header structure contains important
  14227.                       information about the menu, including pointers to
  14228.                       linked lists for the fields, saved video displays,
  14229.                       etc. I strongly advise that you don't even think of
  14230.                       modifying this information yourself. Let the
  14231.                       litebar...() functions handle it for you. These
  14232.                       functions have been developed and used over a
  14233.                       period of several months, programs and conditions
  14234.                       which proves them to be virtually bug free. If you
  14235.                       really want to mess with them yourself, feel free.
  14236.                       But I certainly wouldn't want to attempt it.
  14237.                       Modifying these functions even with the source code
  14238.                       is a headache.
  14239.   
  14240.   See also            menuhk.h
  14241.                       changelitebar(), isHiliteable(), litebar_free(),
  14242.                       litebar_get(), litehilite(), litemessage(),
  14243.                       liteunlite(), menu_litebar()
  14244.                       litebarerrno
  14245.   
  14246.   Example             see demolite.c
  14247.   
  14248.   
  14249.  
  14250.  
  14251.  
  14252.  
  14253.  
  14254.  
  14255.  
  14256.  
  14257.  
  14258.  
  14259.  
  14260.  
  14261.  
  14262.      TCHK 2.1                                                    Page 217
  14263.  
  14264.   
  14265.   Function             litebar_free - frees memory allocated by a
  14266.                                        litebar menu
  14267.   
  14268.   Syntax              void litebar_free(struct litebar_header *lh);
  14269.   
  14270.   Prototype in        menuhk.h
  14271.   
  14272.   Remarks             frees all memory allocated to a litebar menu.
  14273.   
  14274.   Return value        nothing.
  14275.   
  14276.   Note                see litebar_alloc()
  14277.   
  14278.   See also            menuhk.h
  14279.                       changelitebar(), isHiliteable(), litebar_alloc(),
  14280.                       litebar_get(), litehilite(), litemessage(),
  14281.                       liteunlite(), menu_litebar()
  14282.                       litebarerrno
  14283.   
  14284.   Example             see demolite.c
  14285.   
  14286.   
  14287.  
  14288.  
  14289.  
  14290.  
  14291.  
  14292.  
  14293.  
  14294.  
  14295.  
  14296.  
  14297.  
  14298.  
  14299.  
  14300.  
  14301.  
  14302.  
  14303.  
  14304.  
  14305.  
  14306.  
  14307.  
  14308.  
  14309.  
  14310.  
  14311.  
  14312.  
  14313.  
  14314.  
  14315.  
  14316.  
  14317.  
  14318.  
  14319.  
  14320.  
  14321.  
  14322.  
  14323.  
  14324.  
  14325.  
  14326.  
  14327.  
  14328.      TCHK 2.1                                                    Page 218
  14329.  
  14330.   
  14331.   Function             litebar_get - get user's choice from a litebar
  14332.                                       menu
  14333.   
  14334.   Syntax              int litebar_get(struct litebar_header *lh);
  14335.   
  14336.   Prototype in        menuhk.h
  14337.   
  14338.   Remarks             litebar_get does the actual prompting the user for
  14339.                       input. The following keys can be used to navigate
  14340.                       in the menu:
  14341.   
  14342.                            Up, Down,      Move select bar to another
  14343.                            Left, Right    command, as per parms to
  14344.                                           litebar_alloc(). See
  14345.                                           litebar_alloc() for more
  14346.                                           details.
  14347.                            ENTER          Select the hilited option
  14348.                            ESC            Abort
  14349.   
  14350.                       in addition to any cmdkeys and quitkeys.
  14351.   
  14352.                       Other actions may be taken before returning from
  14353.                       this function, according to the flags for the menu.
  14354.                       See litebar_alloc() for more details.
  14355.   
  14356.   Return value        returns zero if ESC was hit. If an command was
  14357.                       chosen, litebar_get() returns the number of the
  14358.                       command selected. This is not the array index of
  14359.                       the command. If command[] has 3 static text items
  14360.                       and a command, and the command is selected, a 1
  14361.                       will be returned, even though the command is the
  14362.                       fourth command with a command index of three
  14363.                       (command[3]). If a quitkey was hit, the return
  14364.                       value will be the key code for the quitkey, plus
  14365.                       1000 (i.e. Ctrl-Z, key code 26, as a quitkey will
  14366.                       return 1026 when it is hit.)
  14367.   
  14368.   See also            menuhk.h
  14369.                       changelitebar(), isHiliteable(), litebar_alloc(),
  14370.                       litebar_free(), litehilite(), litemessage(),
  14371.                       liteunlite(), menu_litebar()
  14372.                       litebarerrno
  14373.   
  14374.   Example             see demolite.c
  14375.   
  14376.   
  14377.  
  14378.  
  14379.  
  14380.  
  14381.  
  14382.  
  14383.  
  14384.  
  14385.  
  14386.  
  14387.  
  14388.  
  14389.  
  14390.  
  14391.  
  14392.  
  14393.  
  14394.      TCHK 2.1                                                    Page 219
  14395.  
  14396.   
  14397.   Function             litehilite - hilite a litebar menu command
  14398.   
  14399.   Syntax              void litehilite(struct litebar_header *lh);
  14400.   
  14401.   Prototype in        menuhk.h
  14402.   
  14403.   Remarks             displays a litebar menu command in the hilited
  14404.                       color via Borland's console i/o.
  14405.   
  14406.                       This function is used internally by several
  14407.                       litebar...() menu functions.
  14408.   
  14409.   Return value        nothing.
  14410.   
  14411.   Note                This function is for internal uses only.
  14412.   
  14413.   See also            menuhk.h
  14414.                       changelitebar(), isHiliteable(), litebar_alloc(),
  14415.                       litebar_free(), litebar_get(), litemessage(),
  14416.                       liteunlite(), menu_litebar()
  14417.                       litebarerrno
  14418.   
  14419.   
  14420.  
  14421.  
  14422.  
  14423.  
  14424.  
  14425.  
  14426.  
  14427.  
  14428.  
  14429.  
  14430.  
  14431.  
  14432.  
  14433.  
  14434.  
  14435.  
  14436.  
  14437.  
  14438.  
  14439.  
  14440.  
  14441.  
  14442.  
  14443.  
  14444.  
  14445.  
  14446.  
  14447.  
  14448.  
  14449.  
  14450.  
  14451.  
  14452.  
  14453.  
  14454.  
  14455.  
  14456.  
  14457.  
  14458.  
  14459.  
  14460.      TCHK 2.1                                                    Page 220
  14461.  
  14462.   
  14463.   Function             litemessage - change the message for a litebar
  14464.                                       menu
  14465.   
  14466.   Syntax              void litemessage(struct litebar_header *lh,
  14467.                                        int len);
  14468.   
  14469.   Prototype in        menuhk.h
  14470.   
  14471.   Remarks             changes the message for a litebar menu.
  14472.   
  14473.                       This function is used internally by several
  14474.                       litebar...() menu functions.
  14475.   
  14476.   Return value        nothing.
  14477.   
  14478.   Note                This function is for internal uses only.
  14479.   
  14480.   See also            menuhk.h
  14481.                       changelitebar(), isHiliteable(), litebar_alloc(),
  14482.                       litebar_free(), litebar_get(), litehilite(),
  14483.                       liteunlite(), menu_litebar()
  14484.                       litebarerrno
  14485.   
  14486.   
  14487.  
  14488.  
  14489.  
  14490.  
  14491.  
  14492.  
  14493.  
  14494.  
  14495.  
  14496.  
  14497.  
  14498.  
  14499.  
  14500.  
  14501.  
  14502.  
  14503.  
  14504.  
  14505.  
  14506.  
  14507.  
  14508.  
  14509.  
  14510.  
  14511.  
  14512.  
  14513.  
  14514.  
  14515.  
  14516.  
  14517.  
  14518.  
  14519.  
  14520.  
  14521.  
  14522.  
  14523.  
  14524.  
  14525.  
  14526.      TCHK 2.1                                                    Page 221
  14527.  
  14528.   
  14529.   Function             liteunlite - unhilite a litebar menu command
  14530.   
  14531.   Syntax              void liteunlite(struct litebar_header *lh);
  14532.   
  14533.   Prototype in        menuhk.h
  14534.   
  14535.   Remarks             displays a litebar menu command in its unhilited
  14536.                       color(s).
  14537.   
  14538.                       This function is used internally by several
  14539.                       litebar...() menu functions.
  14540.   
  14541.   Return value        nothing.
  14542.   
  14543.   Note                This function is for internal uses only.
  14544.   
  14545.   See also            menuhk.h
  14546.                       changelitebar(), isHiliteable(), litebar_alloc(),
  14547.                       litebar_free(), litebar_get(), litehilite(),
  14548.                       litemessage(), menu_litebar()
  14549.                       litebarerrno
  14550.   
  14551.   
  14552.  
  14553.  
  14554.  
  14555.  
  14556.  
  14557.  
  14558.  
  14559.  
  14560.  
  14561.  
  14562.  
  14563.  
  14564.  
  14565.  
  14566.  
  14567.  
  14568.  
  14569.  
  14570.  
  14571.  
  14572.  
  14573.  
  14574.  
  14575.  
  14576.  
  14577.  
  14578.  
  14579.  
  14580.  
  14581.  
  14582.  
  14583.  
  14584.  
  14585.  
  14586.  
  14587.  
  14588.  
  14589.  
  14590.  
  14591.  
  14592.      TCHK 2.1                                                    Page 222
  14593.  
  14594.   
  14595.   Function             longtodostime - convert 1/100 seconds to DOS time
  14596.   
  14597.   Syntax              struct time longtodostime(long t);
  14598.   
  14599.   Prototype in        timehk.h
  14600.   
  14601.   Remarks             this function will convert the time from a long
  14602.                       value of the time in 1/100s of a second to a DOS
  14603.                       time structure.
  14604.   
  14605.   Return value        returns the time as a DOS time structure.
  14606.   
  14607.   See also            dostimetolong()
  14608.   
  14609.   
  14610.  
  14611.  
  14612.  
  14613.  
  14614.  
  14615.  
  14616.  
  14617.  
  14618.  
  14619.  
  14620.  
  14621.  
  14622.  
  14623.  
  14624.  
  14625.  
  14626.  
  14627.  
  14628.  
  14629.  
  14630.  
  14631.  
  14632.  
  14633.  
  14634.  
  14635.  
  14636.  
  14637.  
  14638.  
  14639.  
  14640.  
  14641.  
  14642.  
  14643.  
  14644.  
  14645.  
  14646.  
  14647.  
  14648.  
  14649.  
  14650.  
  14651.  
  14652.  
  14653.  
  14654.  
  14655.  
  14656.  
  14657.  
  14658.      TCHK 2.1                                                    Page 223
  14659.  
  14660.   
  14661.   Function             lpow - raise a base to an exponent
  14662.   
  14663.   Syntax              long lpow(long base, int exponent);
  14664.   
  14665.   Prototype in        real.h
  14666.   
  14667.   Remarks             lpow() calculates base raised to the exponent
  14668.                       power. If base is zero or exponent is negative
  14669.                       (lpow() does not handle either of these cases), it
  14670.                       is treated as a singularity error (_rmatherror =
  14671.                       RSING). Underflow and overflow are trapped with the
  14672.                       appropriate error value in _rmatherror.
  14673.   
  14674.   Return value        returns zero if an error occurred, with an
  14675.                       appropriate error value in _rmatherror, otherwise
  14676.                       the calculated value (non-zero).
  14677.   
  14678.   Note                This function is called internally by several
  14679.                       simulated FP functions. Refer to the section
  14680.                       SIMULATED FP MATH for further details.
  14681.   
  14682.   See also            real.h
  14683.                       _rmatherror
  14684.   
  14685.   
  14686.  
  14687.  
  14688.  
  14689.  
  14690.  
  14691.  
  14692.  
  14693.  
  14694.  
  14695.  
  14696.  
  14697.  
  14698.  
  14699.  
  14700.  
  14701.  
  14702.  
  14703.  
  14704.  
  14705.  
  14706.  
  14707.  
  14708.  
  14709.  
  14710.  
  14711.  
  14712.  
  14713.  
  14714.  
  14715.  
  14716.  
  14717.  
  14718.  
  14719.  
  14720.  
  14721.  
  14722.  
  14723.  
  14724.      TCHK 2.1                                                    Page 224
  14725.  
  14726.   
  14727.   Function             lsgn - sign of a long integer
  14728.   
  14729.   Syntax              #include <mathhk.h>
  14730.                       (int) lsgn(x)
  14731.   
  14732.   Prototype in        mathhk.h
  14733.   
  14734.   Remarks             lsgn will determine the sign of x. Zero is
  14735.                       considered positive.
  14736.   
  14737.                       This function is a macro.
  14738.   
  14739.                       The macro lsign() is defined as lsgn().
  14740.   
  14741.   Return value        returns -1 if x is negative, otherwise 1.
  14742.   
  14743.   See also            fsgn(), isgn()
  14744.   
  14745.   
  14746.  
  14747.  
  14748.  
  14749.  
  14750.  
  14751.  
  14752.  
  14753.  
  14754.  
  14755.  
  14756.  
  14757.  
  14758.  
  14759.  
  14760.  
  14761.  
  14762.  
  14763.  
  14764.  
  14765.  
  14766.  
  14767.  
  14768.  
  14769.  
  14770.  
  14771.  
  14772.  
  14773.  
  14774.  
  14775.  
  14776.  
  14777.  
  14778.  
  14779.  
  14780.  
  14781.  
  14782.  
  14783.  
  14784.  
  14785.  
  14786.  
  14787.  
  14788.  
  14789.  
  14790.      TCHK 2.1                                                    Page 225
  14791.  
  14792.   
  14793.   Function             ltrim - trims leading blanks
  14794.   
  14795.   Syntax              char *ltrim(char *source);
  14796.   
  14797.   Prototype in        stringhk.h
  14798.   
  14799.   Remarks             remove leading blanks in a string. The string
  14800.                       passed to ltrim (source) is modified.
  14801.   
  14802.   Return value        returns a pointer to source.
  14803.   
  14804.   Example             #include <stringhk.h>
  14805.                       #include <stdio.h>            /* for the printf */
  14806.   
  14807.                       main()
  14808.                       {
  14809.                            char msg[25] = "  Hello everyone   ";
  14810.   
  14811.                            printf("String [%s]\n",msg);
  14812.                            printf("ltrim  [%s]\n",ltrim(msg));
  14813.                       }
  14814.        
  14815.   Program output      String [  Hello everyone   ]
  14816.                       ltrim  [Hello everyone   ]
  14817.   
  14818.   
  14819.  
  14820.  
  14821.  
  14822.  
  14823.  
  14824.  
  14825.  
  14826.  
  14827.  
  14828.  
  14829.  
  14830.  
  14831.  
  14832.  
  14833.  
  14834.  
  14835.  
  14836.  
  14837.  
  14838.  
  14839.  
  14840.  
  14841.  
  14842.  
  14843.  
  14844.  
  14845.  
  14846.  
  14847.  
  14848.  
  14849.  
  14850.  
  14851.  
  14852.  
  14853.  
  14854.  
  14855.  
  14856.      TCHK 2.1                                                    Page 226
  14857.  
  14858.   
  14859.   Function             machine_id - determine machine type
  14860.   
  14861.   Syntax              int machine_id(void);
  14862.   
  14863.   Prototype in        ibm.h
  14864.   
  14865.   Remarks             identifies the machine by use of the ROM byte and
  14866.                       model byte (available through a DOS call.) 
  14867.   
  14868.   Return value        returns a code number depending on the machine
  14869.                       type. See ibm.h for more details.
  14870.   
  14871.   Note                This function cannot differentiate between a PS/2
  14872.                       Model 25 and PS/2 Model 30. However, the Model 30
  14873.                       has a hard drive, the Model 25 has none. For now
  14874.                       the Model 30 return code means the presence of a
  14875.                       Model 30 or a Model 25.
  14876.   
  14877.                       The PS/2 Model 70 cannot currently be identified
  14878.                       properly.
  14879.   
  14880.                       Also, the Portable PC cannot be 100% identified
  14881.                       through this function. Aside from the ROM byte
  14882.                       (which is identical to the XT) I don't know of any
  14883.                       distinguishing criteria. Anyone have ideas?
  14884.   
  14885.   See also            ibm.h
  14886.                       cpu_id(), ndp_id(), ROM_date(), ROM_id()
  14887.   
  14888.   Example             #include <ibm.h>
  14889.   
  14890.                       main()
  14891.                       {
  14892.                            printf("Machine ID() code = %d\n",
  14893.                                   machine_id());
  14894.                       }
  14895.   
  14896.   Program output      Machine ID code = 1      /* on my PC */
  14897.   
  14898.   
  14899.  
  14900.  
  14901.  
  14902.  
  14903.  
  14904.  
  14905.  
  14906.  
  14907.  
  14908.  
  14909.  
  14910.  
  14911.  
  14912.  
  14913.  
  14914.  
  14915.  
  14916.  
  14917.  
  14918.  
  14919.  
  14920.  
  14921.  
  14922.      TCHK 2.1                                                    Page 227
  14923.  
  14924.   
  14925.   Function             MButtonPress - mouse button press data
  14926.   
  14927.   Syntax              int MButtonPress(int button);
  14928.   
  14929.   Prototype in        mousehk.h
  14930.   
  14931.   Remarks             determines button press information for the given
  14932.                       button, where the parameter button is 0 for the
  14933.                       left button, 1 for the right button, and 2 for the
  14934.                       middle button (Mouse Systems mouse).
  14935.   
  14936.                       _mouse1 is a bit field
  14937.   
  14938.                            xxxxxxxx xxxxxMRL
  14939.   
  14940.                       where
  14941.   
  14942.                            M = middle button pressed
  14943.                            R = right button pressed
  14944.                            L = left button pressed
  14945.   
  14946.                       _mouse2 contains the number of times the specified
  14947.                       button has been pressed since the last call.
  14948.   
  14949.                       the specified button was last pressed at the
  14950.                       coordinate (_mouse3,_mouse4)
  14951.   
  14952.   Return value        returns the number of times the button has been
  14953.                       pressed since the last call.
  14954.   
  14955.   See also            MButtonRelease(), MButtonStatus()
  14956.   
  14957.   Example             see demomous.c
  14958.   
  14959.   
  14960.  
  14961.  
  14962.  
  14963.  
  14964.  
  14965.  
  14966.  
  14967.  
  14968.  
  14969.  
  14970.  
  14971.  
  14972.  
  14973.  
  14974.  
  14975.  
  14976.  
  14977.  
  14978.  
  14979.  
  14980.  
  14981.  
  14982.  
  14983.  
  14984.  
  14985.  
  14986.  
  14987.  
  14988.      TCHK 2.1                                                    Page 228
  14989.  
  14990.   
  14991.   Function             MButtonRelease - mouse button release data
  14992.   
  14993.   Syntax              int MButtonRelease(int button);
  14994.   
  14995.   Prototype in        mousehk.h
  14996.   
  14997.   Remarks             determines button release information for the given
  14998.                       button, where the parameter button is 0 for the
  14999.                       left button, 1 for the right button, and 2 for the
  15000.                       middle button (Mouse Systems mouse).
  15001.   
  15002.                       _mouse1 is a bit field
  15003.   
  15004.                            xxxxxxxx xxxxxMRL
  15005.   
  15006.                       where
  15007.   
  15008.                            M = middle button released
  15009.                            R = right button released
  15010.                            L = left button released
  15011.   
  15012.                       _mouse2 contains the number of times the specified
  15013.                       button has been released since the last call.
  15014.   
  15015.                       the specified button was last released at the
  15016.                       coordinate (_mouse3,_mouse4)
  15017.   
  15018.   Return value        returns the number of times the button has been
  15019.                       released since the last call.
  15020.   
  15021.   See also            MButtonPress(), MButtonStatus()
  15022.   
  15023.   Example             see demomous.c
  15024.   
  15025.   
  15026.  
  15027.  
  15028.  
  15029.  
  15030.  
  15031.  
  15032.  
  15033.  
  15034.  
  15035.  
  15036.  
  15037.  
  15038.  
  15039.  
  15040.  
  15041.  
  15042.  
  15043.  
  15044.  
  15045.  
  15046.  
  15047.  
  15048.  
  15049.  
  15050.  
  15051.  
  15052.  
  15053.  
  15054.      TCHK 2.1                                                    Page 229
  15055.  
  15056.   
  15057.   Function             MButtonStatus - mouse position and button status
  15058.   
  15059.   Syntax              int MButtonRelease(void);
  15060.   
  15061.   Prototype in        mousehk.h
  15062.   
  15063.   Remarks             determines mouse position and button status
  15064.                       information.
  15065.   
  15066.                       _mouse2 is a bit field
  15067.   
  15068.                            xxxxxxxx xxxxxMRL
  15069.   
  15070.                       where
  15071.   
  15072.                            M = middle button pressed
  15073.                            R = right button pressed
  15074.                            L = left button pressed
  15075.   
  15076.                       the mouse is at the coordinate (_mouse3,_mouse4)
  15077.   
  15078.   Return value        returns the mouse button status information (see
  15079.                       _mouse2 above).
  15080.   
  15081.   See also            MButtonPress(), MButtonRelease()
  15082.   
  15083.   Example             see demomous.c
  15084.   
  15085.   
  15086.  
  15087.  
  15088.  
  15089.  
  15090.  
  15091.  
  15092.  
  15093.  
  15094.  
  15095.  
  15096.  
  15097.  
  15098.  
  15099.  
  15100.  
  15101.  
  15102.  
  15103.  
  15104.  
  15105.  
  15106.  
  15107.  
  15108.  
  15109.  
  15110.  
  15111.  
  15112.  
  15113.  
  15114.  
  15115.  
  15116.  
  15117.  
  15118.  
  15119.  
  15120.      TCHK 2.1                                                    Page 230
  15121.  
  15122.   
  15123.   Function             MCursorGraphic - define graphic cursor
  15124.   
  15125.   Syntax              void MCursorGraphic(int hotx, int hoty,
  15126.                                           char *bitmap);
  15127.   
  15128.   Prototype in        mousehk.h
  15129.   
  15130.   Remarks             defines the mouse cursor used in graphic mode. The
  15131.                       hotx and hoty parameters are the x and y
  15132.                       coordinates of the hot spot in the bitmap (-16 to
  15133.                       16).
  15134.   
  15135.                       The parameter bitmap is a pointer to a graphic
  15136.                       cursor bitmap, comprising of a 16 word screen mask
  15137.                       and a 16 word cursor mask (64 bytes in total). See
  15138.                       Appendix E for more details.
  15139.   
  15140.   Return value        nothing.
  15141.   
  15142.   See also            MCursorOff(), MCursorOn(), MCursorRangex(),
  15143.                       MCursorRangey(), MGotoxy(), MCursorText()
  15144.   
  15145.   Example             see Appendix E
  15146.                       see demomous.c
  15147.   
  15148.   
  15149.  
  15150.  
  15151.  
  15152.  
  15153.  
  15154.  
  15155.  
  15156.  
  15157.  
  15158.  
  15159.  
  15160.  
  15161.  
  15162.  
  15163.  
  15164.  
  15165.  
  15166.  
  15167.  
  15168.  
  15169.  
  15170.  
  15171.  
  15172.  
  15173.  
  15174.  
  15175.  
  15176.  
  15177.  
  15178.  
  15179.  
  15180.  
  15181.  
  15182.  
  15183.  
  15184.  
  15185.  
  15186.      TCHK 2.1                                                    Page 231
  15187.  
  15188.   
  15189.   Function             MCursorOff - turns off (hide) the mouse cursor
  15190.   
  15191.   Syntax              void MCursorOff(void);
  15192.   
  15193.   Prototype in        mousehk.h
  15194.   
  15195.   Remarks             turns the mouse cursor off (hides the mouse
  15196.                       cursor). This function is nestable, so multiple
  15197.                       calls to MCursorOff() to hide the mouse cursor will
  15198.                       require multiple calls to MCursorOn() to unhide it.
  15199.   
  15200.   Return value        nothing.
  15201.   
  15202.   See also            MCursorOn(), MCursorGraphic(), MCursorRangex(),
  15203.                       MCursorRangey(), MCursorText(), MGotoxy()
  15204.   
  15205.   Example             see demomous.c
  15206.   
  15207.   
  15208.  
  15209.  
  15210.  
  15211.  
  15212.  
  15213.  
  15214.  
  15215.  
  15216.  
  15217.  
  15218.  
  15219.  
  15220.  
  15221.  
  15222.  
  15223.  
  15224.  
  15225.  
  15226.  
  15227.  
  15228.  
  15229.  
  15230.  
  15231.  
  15232.  
  15233.  
  15234.  
  15235.  
  15236.  
  15237.  
  15238.  
  15239.  
  15240.  
  15241.  
  15242.  
  15243.  
  15244.  
  15245.  
  15246.  
  15247.  
  15248.  
  15249.  
  15250.  
  15251.  
  15252.      TCHK 2.1                                                    Page 232
  15253.  
  15254.   
  15255.   Function             MCursorOn - turns on (show) the mouse cursor
  15256.   
  15257.   Syntax              void MCursorOn(void);
  15258.   
  15259.   Prototype in        mousehk.h
  15260.   
  15261.   Remarks             turns the mouse cursor on (shows the mouse cursor).
  15262.   
  15263.   Return value        nothing.
  15264.   
  15265.   See also            MCursorOff(), MCursorGraphic(), MCursorRangex(),
  15266.                       MCursorRangey(), MCursorText(), MGotoxy()
  15267.   
  15268.   Example             see demomous.c
  15269.   
  15270.   
  15271.  
  15272.  
  15273.  
  15274.  
  15275.  
  15276.  
  15277.  
  15278.  
  15279.  
  15280.  
  15281.  
  15282.  
  15283.  
  15284.  
  15285.  
  15286.  
  15287.  
  15288.  
  15289.  
  15290.  
  15291.  
  15292.  
  15293.  
  15294.  
  15295.  
  15296.  
  15297.  
  15298.  
  15299.  
  15300.  
  15301.  
  15302.  
  15303.  
  15304.  
  15305.  
  15306.  
  15307.  
  15308.  
  15309.  
  15310.  
  15311.  
  15312.  
  15313.  
  15314.  
  15315.  
  15316.  
  15317.  
  15318.      TCHK 2.1                                                    Page 233
  15319.  
  15320.   
  15321.   Function             MCursorRangex - define horizontal cursor range
  15322.   
  15323.   Syntax              void MCursorRangex(int left, int right);
  15324.   
  15325.   Prototype in        mousehk.h
  15326.   
  15327.   Remarks             defines the minimum and maximum x-coordinates the
  15328.                       mouse may move to.
  15329.   
  15330.   Return value        nothing.
  15331.   
  15332.   See also            MCursorOff(), MCursorOn(), MCursorGraphic(),
  15333.                       MCursorRangey(), MCursorText(), MGotoxy()
  15334.   
  15335.   Example             see demomous.c
  15336.   
  15337.   
  15338.  
  15339.  
  15340.  
  15341.  
  15342.  
  15343.  
  15344.  
  15345.  
  15346.  
  15347.  
  15348.  
  15349.  
  15350.  
  15351.  
  15352.  
  15353.  
  15354.  
  15355.  
  15356.  
  15357.  
  15358.  
  15359.  
  15360.  
  15361.  
  15362.  
  15363.  
  15364.  
  15365.  
  15366.  
  15367.  
  15368.  
  15369.  
  15370.  
  15371.  
  15372.  
  15373.  
  15374.  
  15375.  
  15376.  
  15377.  
  15378.  
  15379.  
  15380.  
  15381.  
  15382.  
  15383.  
  15384.      TCHK 2.1                                                    Page 234
  15385.  
  15386.   
  15387.   Function             MCursorRangey - define vertical cursor range
  15388.   
  15389.   Syntax              void MCursorRangey(int top, int bottom);
  15390.   
  15391.   Prototype in        mousehk.h
  15392.   
  15393.   Remarks             defines the minimum and maximum y-coordinates the
  15394.                       mouse may move to.
  15395.   
  15396.   Return value        nothing.
  15397.   
  15398.   See also            MCursorOff(), MCursorOn(), MCursorGraphic(),
  15399.                       MCursorRangex(), MCursorText(), MGotoxy()
  15400.   
  15401.   Example             see demomous.c
  15402.   
  15403.   
  15404.  
  15405.  
  15406.  
  15407.  
  15408.  
  15409.  
  15410.  
  15411.  
  15412.  
  15413.  
  15414.  
  15415.  
  15416.  
  15417.  
  15418.  
  15419.  
  15420.  
  15421.  
  15422.  
  15423.  
  15424.  
  15425.  
  15426.  
  15427.  
  15428.  
  15429.  
  15430.  
  15431.  
  15432.  
  15433.  
  15434.  
  15435.  
  15436.  
  15437.  
  15438.  
  15439.  
  15440.  
  15441.  
  15442.  
  15443.  
  15444.  
  15445.  
  15446.  
  15447.  
  15448.  
  15449.  
  15450.      TCHK 2.1                                                    Page 235
  15451.  
  15452.   
  15453.   Function             MCursorText - define text cursor
  15454.   
  15455.   Syntax              void MCursorText(boolean usehardware, int parm1,
  15456.                                        int parm2);
  15457.   
  15458.   Prototype in        mousehk.h
  15459.   
  15460.   Remarks             defines the mouse cursor used in text mode. If
  15461.                       usehardware is TRUE, parm1 is the screen mask and
  15462.                       parm2 is the cursor mask. Otherwise, parm1 is the
  15463.                       starting scan line and parm2 is the ending scan
  15464.                       line.
  15465.   
  15466.                       If the software cursor is selected, the
  15467.                       character/attribute data at the current screen
  15468.                       position is ANDed with the screen mask and then
  15469.                       XORed with the cursor mask.
  15470.   
  15471.   Return value        nothing.
  15472.   
  15473.   See also            MCursorOff(), MCursorOn(), MCursorGraphic(),
  15474.                       MCursorRangex(), MCursorRangey(), MGotoxy()
  15475.   
  15476.   Example             see demomous.c
  15477.   
  15478.   
  15479.  
  15480.  
  15481.  
  15482.  
  15483.  
  15484.  
  15485.  
  15486.  
  15487.  
  15488.  
  15489.  
  15490.  
  15491.  
  15492.  
  15493.  
  15494.  
  15495.  
  15496.  
  15497.  
  15498.  
  15499.  
  15500.  
  15501.  
  15502.  
  15503.  
  15504.  
  15505.  
  15506.  
  15507.  
  15508.  
  15509.  
  15510.  
  15511.  
  15512.  
  15513.  
  15514.  
  15515.  
  15516.      TCHK 2.1                                                    Page 236
  15517.  
  15518.   
  15519.   Function             MDriverSize - get driver storage requirements
  15520.   
  15521.   Syntax              unsigned int MDriverSize(void);
  15522.   
  15523.   Prototype in        mousehk.h
  15524.   
  15525.   Remarks             determines the size of a buffer needed to store the
  15526.                       driver state.
  15527.   
  15528.   Return value        returns the size of a buffer needed to store the
  15529.                       driver state.
  15530.   
  15531.   See also            MGetDriver(), MPutDriver()
  15532.   
  15533.   Example             see demomous.c
  15534.   
  15535.   
  15536.  
  15537.  
  15538.  
  15539.  
  15540.  
  15541.  
  15542.  
  15543.  
  15544.  
  15545.  
  15546.  
  15547.  
  15548.  
  15549.  
  15550.  
  15551.  
  15552.  
  15553.  
  15554.  
  15555.  
  15556.  
  15557.  
  15558.  
  15559.  
  15560.  
  15561.  
  15562.  
  15563.  
  15564.  
  15565.  
  15566.  
  15567.  
  15568.  
  15569.  
  15570.  
  15571.  
  15572.  
  15573.  
  15574.  
  15575.  
  15576.  
  15577.  
  15578.  
  15579.  
  15580.  
  15581.  
  15582.      TCHK 2.1                                                    Page 237
  15583.  
  15584.   
  15585.   Function             memory_strategy - get/set memory alloc strategy
  15586.   
  15587.   Syntax              int memory_strategy(boolean read, int *strategy);
  15588.   
  15589.   Prototype in        ibm.h
  15590.   
  15591.   Remarks             this function will get or set the memory allocation
  15592.                       strategy. The variable read determines whether the
  15593.                       function will read or write (get or set) the
  15594.                       strategy value stored at *strategy.
  15595.   
  15596.   Return value        returns zero if successful (and *strategy is the
  15597.                       strategy being used) or, if an error occurs, the
  15598.                       error code (in which case the value in *strategy is
  15599.                       meaningless.)
  15600.   
  15601.   Note                this function requires DOS 3.xx.
  15602.   
  15603.   See also            ibm.h
  15604.   
  15605.   Example             #include <ibm.h>
  15606.   
  15607.                       #define GET TRUE         /* read */
  15608.                       #define SET FALSE        /* write */
  15609.   
  15610.                       main()
  15611.                       {
  15612.                            int memstrat;
  15613.   
  15614.                            if (memory_strategy(GET,&memstrat) !=
  15615.                                      MEM_STRAT_BEST)
  15616.                                 memory_strategy(SET,MEM_STRAT_BEST);
  15617.                       }
  15618.        /* Bad, no error checking done. When you document
  15619.           100+ functions, you write the best code, don't you? */
  15620.   
  15621.  
  15622.  
  15623.  
  15624.  
  15625.  
  15626.  
  15627.  
  15628.  
  15629.  
  15630.  
  15631.  
  15632.  
  15633.  
  15634.  
  15635.  
  15636.  
  15637.  
  15638.  
  15639.  
  15640.  
  15641.  
  15642.  
  15643.  
  15644.  
  15645.  
  15646.  
  15647.  
  15648.      TCHK 2.1                                                    Page 238
  15649.  
  15650.   
  15651.   Function             MEmulateLightpenOff - mouse light pen emulation
  15652.                                               off
  15653.   
  15654.   Syntax              void MEmulateLightpenOff(void);
  15655.   
  15656.   Prototype in        mousehk.h
  15657.   
  15658.   Remarks             turns off mouse emulation of a light pen.
  15659.   
  15660.   Return value        nothing.
  15661.   
  15662.   See also            MEmulateLightpenOn()
  15663.   
  15664.   Example             see demomous.c
  15665.   
  15666.   
  15667.  
  15668.  
  15669.  
  15670.  
  15671.  
  15672.  
  15673.  
  15674.  
  15675.  
  15676.  
  15677.  
  15678.  
  15679.  
  15680.  
  15681.  
  15682.  
  15683.  
  15684.  
  15685.  
  15686.  
  15687.  
  15688.  
  15689.  
  15690.  
  15691.  
  15692.  
  15693.  
  15694.  
  15695.  
  15696.  
  15697.  
  15698.  
  15699.  
  15700.  
  15701.  
  15702.  
  15703.  
  15704.  
  15705.  
  15706.  
  15707.  
  15708.  
  15709.  
  15710.  
  15711.  
  15712.  
  15713.  
  15714.      TCHK 2.1                                                    Page 239
  15715.  
  15716.   
  15717.   Function             MEmulateLightpenOn - mouse light pen emulation on
  15718.   
  15719.   Syntax              void MEmulateLightpenOn(void);
  15720.   
  15721.   Prototype in        mousehk.h
  15722.   
  15723.   Remarks             turns on mouse emulation of a light pen.
  15724.   
  15725.   Return value        nothing.
  15726.   
  15727.   See also            MEmulateLightpenOff()
  15728.   
  15729.   Example             see demomous.c
  15730.   
  15731.   
  15732.  
  15733.  
  15734.  
  15735.  
  15736.  
  15737.  
  15738.  
  15739.  
  15740.  
  15741.  
  15742.  
  15743.  
  15744.  
  15745.  
  15746.  
  15747.  
  15748.  
  15749.  
  15750.  
  15751.  
  15752.  
  15753.  
  15754.  
  15755.  
  15756.  
  15757.  
  15758.  
  15759.  
  15760.  
  15761.  
  15762.  
  15763.  
  15764.  
  15765.  
  15766.  
  15767.  
  15768.  
  15769.  
  15770.  
  15771.  
  15772.  
  15773.  
  15774.  
  15775.  
  15776.  
  15777.  
  15778.  
  15779.  
  15780.      TCHK 2.1                                                    Page 240
  15781.  
  15782.   
  15783.   Function             menu_litebar - litebar style menu
  15784.   
  15785.   Syntax              int menu_litebar(int left, int top, int right,
  15786.                                      int bottom, char *frame, char
  15787.                                      *title, int titlejustify, int count,
  15788.                                      char *command[], int cmdleft[], int
  15789.                                      cmdright[], int cmdup[], int
  15790.                                      cmddown[], int cmdkey[], char
  15791.                                      cmdflag[], int cmdx[], int cmdy[],
  15792.                                      char *message[], int msgx, int msgy,
  15793.                                      int argq, int quitkey[], int
  15794.                                      colframe, int coltitle, int colnorm,
  15795.                                      int colcmdkey, int colhilite, int
  15796.                                      coldisable, int coldishilite, int
  15797.                                      colnotopt, int colmessage, int
  15798.                                      defaultcommand, unsigned flags);
  15799.   
  15800.   Prototype in        menuhk.h
  15801.   
  15802.   Remarks             an all-in-one function, menu_litebar() is
  15803.                       equivalent to calling litebar_alloc(),
  15804.                       litebar_get() and litebar_free(), with the flags
  15805.                       Quit, Erase menu, case Independent and Wraparound.
  15806.                       See litebar_alloc() and litebar_get for more
  15807.                       details about parameters and menu keys.
  15808.   
  15809.   Return value        returns zero if ESC was hit, otherwise returns the
  15810.                       number of the command selected. This is not the
  15811.                       array index of the command. If command[] has 3
  15812.                       static text items and a command, and the command is
  15813.                       selected, a 1 will be returned, even though the
  15814.                       command is the fourth command with a command index
  15815.                       of three (command[3]).
  15816.   
  15817.   Note                Use litebarpopup() when you want a one-shot menu,
  15818.                       and the litebar...() functions when you plan on
  15819.                       keeping the menu on the screen for multiple choices
  15820.                       (perhaps when overlaying submenus).
  15821.   
  15822.   See also            menuhk.h
  15823.                       changelitebar(), isHiliteable(), litebar_alloc(),
  15824.                       litebar_free(), litebar_get(), litehilite(),
  15825.                       litemessage(), liteunlite()
  15826.                       litebarerrno
  15827.   
  15828.   Example             see demolite.c
  15829.   
  15830.   
  15831.  
  15832.  
  15833.  
  15834.  
  15835.  
  15836.  
  15837.  
  15838.  
  15839.  
  15840.  
  15841.  
  15842.  
  15843.  
  15844.  
  15845.  
  15846.      TCHK 2.1                                                    Page 241
  15847.  
  15848.   
  15849.   Function             menu_popup - popup style menu
  15850.   
  15851.   Syntax              int menu_popup(int left, int top, int right, int
  15852.                                      bottom, char frame[], char *title,
  15853.                                      int titlejustify, char *command[],
  15854.                                      int cmdkey[], char cmdflag[], int
  15855.                                      colframe, int coltitle, int colnorm,
  15856.                                      int colcmdkey, int colhilite, int
  15857.                                      coldisable, int coldishilite, int
  15858.                                      colnotopt, int defaultcommand,
  15859.                                      unsigned flags);
  15860.   
  15861.   Prototype in        menuhk.h
  15862.   
  15863.   Remarks             an all-in-one function, menu_popup() is equivalent
  15864.                       to calling popup_alloc(), popup_get() and
  15865.                       popup_free(), with the flags Quit, Erase menu, case
  15866.                       Independent and Wraparound. See popup_alloc() and
  15867.                       popup_get for more details about parameters and
  15868.                       menu keys.
  15869.   
  15870.   Return value        returns zero if ESC was hit, otherwise returns the
  15871.                       number of the command selected. This is not the
  15872.                       array index of the command. If command[] has 3
  15873.                       static text items and a command, and the command is
  15874.                       selected, a 1 will be returned, even though the
  15875.                       command is the fourth command with a command index
  15876.                       of three (command[3]).
  15877.   
  15878.   Note                Use menu_popup() when you want a one-shot menu, and
  15879.                       the popup...() functions when you plan on keeping
  15880.                       the menu on the screen for multiple choices
  15881.                       (perhaps when overlaying submenus).
  15882.   
  15883.   See also            menuhk.h
  15884.                       isHiliteable(), popup_alloc(), popup_free(),
  15885.                       popup_get(), popup_restore(), popup_setcurrent(),
  15886.                       pophilite(), popunlite()
  15887.                       popuperrno
  15888.   
  15889.   Example             see demopop.c
  15890.   
  15891.   
  15892.  
  15893.  
  15894.  
  15895.  
  15896.  
  15897.  
  15898.  
  15899.  
  15900.  
  15901.  
  15902.  
  15903.  
  15904.  
  15905.  
  15906.  
  15907.  
  15908.  
  15909.  
  15910.  
  15911.  
  15912.      TCHK 2.1                                                    Page 242
  15913.  
  15914.   
  15915.   Function             MGetDisplayPage - get mouse display page number
  15916.   
  15917.   Syntax              unsigned MGetDisplayPage(void);
  15918.   
  15919.   Prototype in        mousehk.h
  15920.   
  15921.   Remarks             gets the mouse display page number.
  15922.   
  15923.   Return value        returns the mouse display page number.
  15924.   
  15925.   See also            MSetDisplayPage()
  15926.   
  15927.   Example             see demomous.c
  15928.   
  15929.   
  15930.  
  15931.  
  15932.  
  15933.  
  15934.  
  15935.  
  15936.  
  15937.  
  15938.  
  15939.  
  15940.  
  15941.  
  15942.  
  15943.  
  15944.  
  15945.  
  15946.  
  15947.  
  15948.  
  15949.  
  15950.  
  15951.  
  15952.  
  15953.  
  15954.  
  15955.  
  15956.  
  15957.  
  15958.  
  15959.  
  15960.  
  15961.  
  15962.  
  15963.  
  15964.  
  15965.  
  15966.  
  15967.  
  15968.  
  15969.  
  15970.  
  15971.  
  15972.  
  15973.  
  15974.  
  15975.  
  15976.  
  15977.  
  15978.      TCHK 2.1                                                    Page 243
  15979.  
  15980.   
  15981.   Function             MGetDriver - save mouse driver state
  15982.   
  15983.   Syntax              void MGetDriver(char far *savebuffer);
  15984.   
  15985.   Prototype in        mousehk.h
  15986.   
  15987.   Remarks             saves the driver state in the memory location
  15988.                       pointed to by savebuffer. Make sure savebuffer
  15989.                       points to sufficient allocated memory to save the
  15990.                       entire driver state or unpredictable results may
  15991.                       occur. See MDriverSize() to determine the size
  15992.                       needed to save the driver state.
  15993.   
  15994.   Return value        nothing.
  15995.   
  15996.   See also            MDriverSize(), MPutDriver()
  15997.   
  15998.   Example             see demomous.c
  15999.   
  16000.   
  16001.  
  16002.  
  16003.  
  16004.  
  16005.  
  16006.  
  16007.  
  16008.  
  16009.  
  16010.  
  16011.  
  16012.  
  16013.  
  16014.  
  16015.  
  16016.  
  16017.  
  16018.  
  16019.  
  16020.  
  16021.  
  16022.  
  16023.  
  16024.  
  16025.  
  16026.  
  16027.  
  16028.  
  16029.  
  16030.  
  16031.  
  16032.  
  16033.  
  16034.  
  16035.  
  16036.  
  16037.  
  16038.  
  16039.  
  16040.  
  16041.  
  16042.  
  16043.  
  16044.      TCHK 2.1                                                    Page 244
  16045.  
  16046.   
  16047.   Function             MGetSensitivity - get mouse sensitivity
  16048.   
  16049.   Syntax              unsigned MGetSensitivity(void);
  16050.   
  16051.   Prototype in        mousehk.h
  16052.   
  16053.   Remarks             gets the mouse sensitivity.
  16054.   
  16055.                       _mouse2 is the horizontal mickey/pixel ratio, as
  16056.                       used by MSetRatio().
  16057.   
  16058.                       _mouse3 is the vertical mickey/pixel ratio, as used
  16059.                       by MSetRatio().
  16060.   
  16061.                       _mouse4 is the double speed threshold, as used by
  16062.                       MSetThreshold().
  16063.   
  16064.   Return value        returns the double speed threshold.
  16065.   
  16066.   See also            MSetRatio(), MSetSensitivity(), MSetThreshold()
  16067.   
  16068.   Example             see demomous.c
  16069.   
  16070.   
  16071.  
  16072.  
  16073.  
  16074.  
  16075.  
  16076.  
  16077.  
  16078.  
  16079.  
  16080.  
  16081.  
  16082.  
  16083.  
  16084.  
  16085.  
  16086.  
  16087.  
  16088.  
  16089.  
  16090.  
  16091.  
  16092.  
  16093.  
  16094.  
  16095.  
  16096.  
  16097.  
  16098.  
  16099.  
  16100.  
  16101.  
  16102.  
  16103.  
  16104.  
  16105.  
  16106.  
  16107.  
  16108.  
  16109.  
  16110.      TCHK 2.1                                                    Page 245
  16111.  
  16112.   
  16113.   Function             MGetVerType - get software version and mouse type
  16114.   
  16115.   Syntax              unsigned int MGetVerType(void);
  16116.   
  16117.   Prototype in        mousehk.h
  16118.   
  16119.   Remarks             determines the mouse software version and the mouse
  16120.                       type.
  16121.   
  16122.                       _mouse1 is the major version number of the mouse
  16123.                       software
  16124.   
  16125.                       _mouse2 is the minor version number of the mouse
  16126.                       software
  16127.   
  16128.                       _mouse3 is the type of mouse, where:
  16129.   
  16130.                            1 = bus
  16131.                            2 = serial
  16132.                            3 = InPort
  16133.                            4 = PS/2
  16134.                            5 = HP
  16135.   
  16136.                       _mouse4 is the interrupt request line used by the
  16137.                       mouse, where:
  16138.   
  16139.                               0 = PS/2
  16140.                            2..7 = IRQ2..IRQ7
  16141.   
  16142.   Return value        returns the version number in the form major/minor
  16143.                       where the high byte is the major version number and
  16144.                       the low byte is the minor version number. If an
  16145.                       error occurred, 0xFFFF is returned and the mouse
  16146.                       variables _mouse# (# = 1 to 4) are all set to 0.
  16147.   
  16148.   Note                The global variables _mouse# do NOT return
  16149.                       registers on a 1-to-1 basis for this function.
  16150.                       Rather, _mouse1/_mouse2 form the BX register and
  16151.                       _mouse3/_mouse4 form the CX register.
  16152.   
  16153.   Example             see demomous.c
  16154.   
  16155.   
  16156.  
  16157.  
  16158.  
  16159.  
  16160.  
  16161.  
  16162.  
  16163.  
  16164.  
  16165.  
  16166.  
  16167.  
  16168.  
  16169.  
  16170.  
  16171.  
  16172.  
  16173.  
  16174.  
  16175.  
  16176.      TCHK 2.1                                                    Page 246
  16177.  
  16178.   
  16179.   Function             MGotoxy - position mouse cursor
  16180.   
  16181.   Syntax              void MGotoxy(int x, int y);
  16182.   
  16183.   Prototype in        mousehk.h
  16184.   
  16185.   Remarks             positions the mouse cursor at the coordinate (x,y).
  16186.   
  16187.   Return value        nothing.
  16188.   
  16189.   See also            MCursorOff(), MCursorOn(), MCursorGraphic(),
  16190.                       MCursorRangex(), MCursorRangey(), MCursorText()
  16191.   
  16192.   Example             see demomous.c
  16193.   
  16194.   
  16195.  
  16196.  
  16197.  
  16198.  
  16199.  
  16200.  
  16201.  
  16202.  
  16203.  
  16204.  
  16205.  
  16206.  
  16207.  
  16208.  
  16209.  
  16210.  
  16211.  
  16212.  
  16213.  
  16214.  
  16215.  
  16216.  
  16217.  
  16218.  
  16219.  
  16220.  
  16221.  
  16222.  
  16223.  
  16224.  
  16225.  
  16226.  
  16227.  
  16228.  
  16229.  
  16230.  
  16231.  
  16232.  
  16233.  
  16234.  
  16235.  
  16236.  
  16237.  
  16238.  
  16239.  
  16240.  
  16241.  
  16242.      TCHK 2.1                                                    Page 247
  16243.  
  16244.   
  16245.   Function             mid - is a number within a range
  16246.   
  16247.   Syntax              #include <mathhk.h>
  16248.                       (boolean) mid(a,x,b)
  16249.   
  16250.   Prototype in        mathhk.h
  16251.   
  16252.   Remarks             mid checks if x is between a and b, inclusive.
  16253.   
  16254.                       This function is a macro.
  16255.   
  16256.   Return value        returns TRUE if x is between a and b, inclusive,
  16257.                       otherwise FALSE.
  16258.   
  16259.   See also            nmid()
  16260.   
  16261.   
  16262.  
  16263.  
  16264.  
  16265.  
  16266.  
  16267.  
  16268.  
  16269.  
  16270.  
  16271.  
  16272.  
  16273.  
  16274.  
  16275.  
  16276.  
  16277.  
  16278.  
  16279.  
  16280.  
  16281.  
  16282.  
  16283.  
  16284.  
  16285.  
  16286.  
  16287.  
  16288.  
  16289.  
  16290.  
  16291.  
  16292.  
  16293.  
  16294.  
  16295.  
  16296.  
  16297.  
  16298.  
  16299.  
  16300.  
  16301.  
  16302.  
  16303.  
  16304.  
  16305.  
  16306.  
  16307.  
  16308.      TCHK 2.1                                                    Page 248
  16309.  
  16310.   
  16311.   Function             midstr - return the middle portion of a string
  16312.   
  16313.   Syntax              char *midstr(char *source, int begin, int len);
  16314.   
  16315.   Prototype in        stringhk.h
  16316.   
  16317.   Remarks             midstr performs just like its BASIC counterpart
  16318.                       MID$().
  16319.   
  16320.                       midstr returns the middle part of a string.
  16321.   
  16322.   Return value        midstr returns the substring of source, using begin
  16323.                       as the offset from the beginning to start the
  16324.                       substring, for len characters.
  16325.   
  16326.                       midstr returns a pointer to the storage location
  16327.                       containing the new string, or NULL if space could
  16328.                       not be allocated.
  16329.   
  16330.   See also            leftstr(), rightstr()
  16331.   
  16332.   Example             #include <stringhk.h>
  16333.                       #include <stdio.h>            /* for the printf */
  16334.   
  16335.                       main()
  16336.                       {
  16337.                            char msg[25], *m;
  16338.   
  16339.                            strcpy(msg,"This is another test");
  16340.                            m = midstr(msg,5,7);
  16341.                            printf("%s\n",msg);
  16342.                            printf("%s\n",m);
  16343.                       }
  16344.   
  16345.   Program output      This is another test
  16346.                       is anot
  16347.   
  16348.   
  16349.  
  16350.  
  16351.  
  16352.  
  16353.  
  16354.  
  16355.  
  16356.  
  16357.  
  16358.  
  16359.  
  16360.  
  16361.  
  16362.  
  16363.  
  16364.  
  16365.  
  16366.  
  16367.  
  16368.  
  16369.  
  16370.  
  16371.  
  16372.  
  16373.  
  16374.      TCHK 2.1                                                    Page 249
  16375.  
  16376.   
  16377.   Function             MMickeysMovedx - number of mickeys mouse moved
  16378.                                          horizontally
  16379.   
  16380.   Syntax              int MMickeysMovedx(void);
  16381.   
  16382.   Prototype in        mousehk.h
  16383.   
  16384.   Remarks             determines the number of mickeys the mouse has
  16385.                       moved horizontally since the last call.
  16386.   
  16387.                       _mouse3 contains the number of mickeys the mouse
  16388.                       has moved horizontally since the last call.
  16389.   
  16390.                       _mouse4 contains the number of mickeys the mouse
  16391.                       has moved vertically since the last call.
  16392.   
  16393.   Return value        returns the number of mickeys the mouse has moved
  16394.                       horizontally since the last call.
  16395.   
  16396.   Note                positive values indicate down/right.
  16397.   
  16398.   See also            MMickeysMovedy()
  16399.   
  16400.   Example             see demomous.c
  16401.   
  16402.   
  16403.  
  16404.  
  16405.  
  16406.  
  16407.  
  16408.  
  16409.  
  16410.  
  16411.  
  16412.  
  16413.  
  16414.  
  16415.  
  16416.  
  16417.  
  16418.  
  16419.  
  16420.  
  16421.  
  16422.  
  16423.  
  16424.  
  16425.  
  16426.  
  16427.  
  16428.  
  16429.  
  16430.  
  16431.  
  16432.  
  16433.  
  16434.  
  16435.  
  16436.  
  16437.  
  16438.  
  16439.  
  16440.      TCHK 2.1                                                    Page 250
  16441.  
  16442.   
  16443.   Function             MMickeysMovedy - number of mickeys mouse moved
  16444.                                          vertically
  16445.   
  16446.   Syntax              int MMickeysMovedy(void);
  16447.   
  16448.   Prototype in        mousehk.h
  16449.   
  16450.   Remarks             determines the number of mickeys the mouse has
  16451.                       moved vertically since the last call.
  16452.   
  16453.                       _mouse3 contains the number of mickeys the mouse
  16454.                       has moved horizontally since the last call.
  16455.   
  16456.                       _mouse4 contains the number of mickeys the mouse
  16457.                       has moved vertically since the last call.
  16458.   
  16459.   Return value        returns the number of mickeys the mouse has moved
  16460.                       vertically since the last call.
  16461.   
  16462.   Note                positive values indicate down/right.
  16463.   
  16464.   See also            MMickeysMovedx()
  16465.   
  16466.   Example             see demomous.c
  16467.   
  16468.   
  16469.  
  16470.  
  16471.  
  16472.  
  16473.  
  16474.  
  16475.  
  16476.  
  16477.  
  16478.  
  16479.  
  16480.  
  16481.  
  16482.  
  16483.  
  16484.  
  16485.  
  16486.  
  16487.  
  16488.  
  16489.  
  16490.  
  16491.  
  16492.  
  16493.  
  16494.  
  16495.  
  16496.  
  16497.  
  16498.  
  16499.  
  16500.  
  16501.  
  16502.  
  16503.  
  16504.  
  16505.  
  16506.      TCHK 2.1                                                    Page 251
  16507.  
  16508.   
  16509.   Function             monthexpand - convert a month abbrev to its name
  16510.   
  16511.   Syntax              char *monthexpand(int month);
  16512.   
  16513.   Prototype in        datehk.h
  16514.   
  16515.   Remarks             monthexpand returns the name of a month given its
  16516.                       numeric abbreviation.
  16517.   
  16518.                       monthexpand returns an element of a static char
  16519.                       array, so you should not make any changes directly
  16520.                       to the returned value, but rather copy the returned
  16521.                       value to a safe piece of memory.
  16522.   
  16523.   Return value        returns a pointer to the storage location
  16524.                       containing the date structure, or NULL if the month
  16525.                       given is invalid.
  16526.   
  16527.   See also            Months[], MonthAbbr[]  (global variables)
  16528.                       Cal...(), date_convert(), ddatetofull(),
  16529.                       ddatetoshort(), ddatetostr(), fulltoddate(),
  16530.                       Greg...(), Jul...(), shorttoddate(), strtoddate()
  16531.   
  16532.   Example             #include <datehk.h>
  16533.   
  16534.                       main()
  16535.                       {
  16536.                            printf("Month 4 = %s\n",monthexpand(4));
  16537.                       }
  16538.   
  16539.   Program output      Month 4 = April
  16540.   
  16541.  
  16542.  
  16543.  
  16544.  
  16545.  
  16546.  
  16547.  
  16548.  
  16549.  
  16550.  
  16551.  
  16552.  
  16553.  
  16554.  
  16555.  
  16556.  
  16557.  
  16558.  
  16559.  
  16560.  
  16561.  
  16562.  
  16563.  
  16564.  
  16565.  
  16566.  
  16567.  
  16568.  
  16569.  
  16570.  
  16571.  
  16572.      TCHK 2.1                                                    Page 252
  16573.  
  16574.   
  16575.   Function             MouseReset - reset mouse software only
  16576.   
  16577.   Syntax              boolean MouseReset(void);
  16578.   
  16579.   Prototype in        mousehk.h
  16580.   
  16581.   Remarks             if a mouse is installed, MouseReset() will reset
  16582.                       the mouse software only, leaving the mouse hardware
  16583.                       alone. Unlike ismouse(), the number of buttons is
  16584.                       not detected via this function, nor is the mouse
  16585.                       itself reset, only the mouse software.
  16586.   
  16587.   Return value        returns TRUE if a mouse is installed, FALSE
  16588.                       otherwise.
  16589.   
  16590.   See also            ismouse(), MGetVerType()
  16591.   
  16592.   Example             see demomous.c
  16593.   
  16594.   
  16595.  
  16596.  
  16597.  
  16598.  
  16599.  
  16600.  
  16601.  
  16602.  
  16603.  
  16604.  
  16605.  
  16606.  
  16607.  
  16608.  
  16609.  
  16610.  
  16611.  
  16612.  
  16613.  
  16614.  
  16615.  
  16616.  
  16617.  
  16618.  
  16619.  
  16620.  
  16621.  
  16622.  
  16623.  
  16624.  
  16625.  
  16626.  
  16627.  
  16628.  
  16629.  
  16630.  
  16631.  
  16632.  
  16633.  
  16634.  
  16635.  
  16636.  
  16637.  
  16638.      TCHK 2.1                                                    Page 253
  16639.  
  16640.   
  16641.   Function             MPutDriver - restore mouse driver state
  16642.   
  16643.   Syntax              void MPutDriver(char far *savebuffer);
  16644.   
  16645.   Prototype in        mousehk.h
  16646.   
  16647.   Remarks             restores the driver state from the memory location
  16648.                       pointed to by savebuffer.
  16649.   
  16650.   Return value        nothing.
  16651.   
  16652.   See also            MDriverSize(), MGetDriver()
  16653.   
  16654.   Example             see demomous.c
  16655.   
  16656.   
  16657.  
  16658.  
  16659.  
  16660.  
  16661.  
  16662.  
  16663.  
  16664.  
  16665.  
  16666.  
  16667.  
  16668.  
  16669.  
  16670.  
  16671.  
  16672.  
  16673.  
  16674.  
  16675.  
  16676.  
  16677.  
  16678.  
  16679.  
  16680.  
  16681.  
  16682.  
  16683.  
  16684.  
  16685.  
  16686.  
  16687.  
  16688.  
  16689.  
  16690.  
  16691.  
  16692.  
  16693.  
  16694.  
  16695.  
  16696.  
  16697.  
  16698.  
  16699.  
  16700.  
  16701.  
  16702.  
  16703.  
  16704.      TCHK 2.1                                                    Page 254
  16705.  
  16706.   
  16707.   Function             MSetDisplayPage - set mouse display page number
  16708.   
  16709.   Syntax              void MSetDisplayPage(unsigned page);
  16710.   
  16711.   Prototype in        mousehk.h
  16712.   
  16713.   Remarks             sets the mouse display page number to the value of
  16714.                       the parameter page.
  16715.   
  16716.   Return value        nothing.
  16717.   
  16718.   See also            MGetDisplayPage()
  16719.   
  16720.   Example             see demomous.c
  16721.   
  16722.   
  16723.  
  16724.  
  16725.  
  16726.  
  16727.  
  16728.  
  16729.  
  16730.  
  16731.  
  16732.  
  16733.  
  16734.  
  16735.  
  16736.  
  16737.  
  16738.  
  16739.  
  16740.  
  16741.  
  16742.  
  16743.  
  16744.  
  16745.  
  16746.  
  16747.  
  16748.  
  16749.  
  16750.  
  16751.  
  16752.  
  16753.  
  16754.  
  16755.  
  16756.  
  16757.  
  16758.  
  16759.  
  16760.  
  16761.  
  16762.  
  16763.  
  16764.  
  16765.  
  16766.  
  16767.  
  16768.  
  16769.  
  16770.      TCHK 2.1                                                    Page 255
  16771.  
  16772.   
  16773.   Function             MSetRatio - set mickey to pixel ratio
  16774.   
  16775.   Syntax              void MSetRatio(int mickeyx, int mickeyy);
  16776.   
  16777.   Prototype in        mousehk.h
  16778.   
  16779.   Remarks             sets the mickey to pixel ratio, where mickeyx is
  16780.                       the number of mickeys per 8 pixels horizontally
  16781.                       (default = 8) and mickeyy is the number of mickeys
  16782.                       per 8 pixels vertically (default = 16).
  16783.   
  16784.   Return value        nothing.
  16785.   
  16786.   See also            MGetSensitivity(), MSetSensitivity(),
  16787.                       MSetThreshold()
  16788.   
  16789.   Example             see demomous.c
  16790.   
  16791.   
  16792.  
  16793.  
  16794.  
  16795.  
  16796.  
  16797.  
  16798.  
  16799.  
  16800.  
  16801.  
  16802.  
  16803.  
  16804.  
  16805.  
  16806.  
  16807.  
  16808.  
  16809.  
  16810.  
  16811.  
  16812.  
  16813.  
  16814.  
  16815.  
  16816.  
  16817.  
  16818.  
  16819.  
  16820.  
  16821.  
  16822.  
  16823.  
  16824.  
  16825.  
  16826.  
  16827.  
  16828.  
  16829.  
  16830.  
  16831.  
  16832.  
  16833.  
  16834.  
  16835.  
  16836.      TCHK 2.1                                                    Page 256
  16837.  
  16838.   
  16839.   Function             MSetSensitivity - set mouse sensitivity
  16840.   
  16841.   Syntax              void MSetSensitivity(int horiz, int vert,
  16842.                                            int dspeedthresh);
  16843.   
  16844.   Prototype in        mousehk.h
  16845.   
  16846.   Remarks             sets the mouse sensitivity. The horiz and vert
  16847.                       parameters set the mickey/pixel ratio, as per
  16848.                       MSetRatio(), and the dspeedthresh parameter sets
  16849.                       the double speed threshold, as per MSetThreshold().
  16850.   
  16851.   Return value        nothing.
  16852.   
  16853.   See also            MGetSensitivity(), MSetRatio(), MSetThreshold()
  16854.   
  16855.   Example             see demomous.c
  16856.   
  16857.   
  16858.  
  16859.  
  16860.  
  16861.  
  16862.  
  16863.  
  16864.  
  16865.  
  16866.  
  16867.  
  16868.  
  16869.  
  16870.  
  16871.  
  16872.  
  16873.  
  16874.  
  16875.  
  16876.  
  16877.  
  16878.  
  16879.  
  16880.  
  16881.  
  16882.  
  16883.  
  16884.  
  16885.  
  16886.  
  16887.  
  16888.  
  16889.  
  16890.  
  16891.  
  16892.  
  16893.  
  16894.  
  16895.  
  16896.  
  16897.  
  16898.  
  16899.  
  16900.  
  16901.  
  16902.      TCHK 2.1                                                    Page 257
  16903.  
  16904.   
  16905.   Function             MSetThreshold - set double speed threshold
  16906.   
  16907.   Syntax              void MSetThreshold(int speed);
  16908.   
  16909.   Prototype in        mousehk.h
  16910.   
  16911.   Remarks             sets the double speed threshold in mickeys/second,
  16912.                       according the the paramter speed. If speed == 0 a
  16913.                       default threshold speed of 64 mickeys/second is
  16914.                       used. When the mouse speed exceeds the threshold,
  16915.                       the cursor's on-screen motion is doubled.
  16916.   
  16917.   Return value        nothing.
  16918.   
  16919.   See also            MGetSensitivity(), MSetRatio(), MSetSensitivity()
  16920.   
  16921.   Example             see demomous.c
  16922.   
  16923.   
  16924.  
  16925.  
  16926.  
  16927.  
  16928.  
  16929.  
  16930.  
  16931.  
  16932.  
  16933.  
  16934.  
  16935.  
  16936.  
  16937.  
  16938.  
  16939.  
  16940.  
  16941.  
  16942.  
  16943.  
  16944.  
  16945.  
  16946.  
  16947.  
  16948.  
  16949.  
  16950.  
  16951.  
  16952.  
  16953.  
  16954.  
  16955.  
  16956.  
  16957.  
  16958.  
  16959.  
  16960.  
  16961.  
  16962.  
  16963.  
  16964.  
  16965.  
  16966.  
  16967.  
  16968.      TCHK 2.1                                                    Page 258
  16969.  
  16970.   
  16971.   Function             MUpdateScreen - define screen region for updating
  16972.   
  16973.   Syntax              void MUpdateScreen(int left, int top, int right,
  16974.                                          int bottom);
  16975.   
  16976.   Prototype in        mousehk.h
  16977.   
  16978.   Remarks             defines a region of the screen to be updated, from
  16979.                       the coordinates (left,top) to (right,bottom).
  16980.   
  16981.   Return value        nothing.
  16982.   
  16983.   Note                The mouse cursor is hidden during updating and must
  16984.                       be explicitly turned on again (via MCursorOn()) to
  16985.                       be visible.
  16986.   
  16987.   See also            MCursorOn()
  16988.   
  16989.   Example             see demomous.c
  16990.   
  16991.   
  16992.  
  16993.  
  16994.  
  16995.  
  16996.  
  16997.  
  16998.  
  16999.  
  17000.  
  17001.  
  17002.  
  17003.  
  17004.  
  17005.  
  17006.  
  17007.  
  17008.  
  17009.  
  17010.  
  17011.  
  17012.  
  17013.  
  17014.  
  17015.  
  17016.  
  17017.  
  17018.  
  17019.  
  17020.  
  17021.  
  17022.  
  17023.  
  17024.  
  17025.  
  17026.  
  17027.  
  17028.  
  17029.  
  17030.  
  17031.  
  17032.  
  17033.  
  17034.      TCHK 2.1                                                    Page 259
  17035.  
  17036.   
  17037.   Function             ndp_id - identify the math coprocessor
  17038.   
  17039.   Syntax              int ndp_id(void);
  17040.   
  17041.   Prototype in        chiphk.h
  17042.   
  17043.   Remarks             ndp_id does some opcode magic to identify the
  17044.                       numerical data processor (math coprocessor as it's
  17045.                       commonly called.) If a math coprocessor is present,
  17046.                       ndp_id recognizes the 8087, 80287, and the 80387.
  17047.   
  17048.                       ndp_id does not check dip switches but uses the
  17049.                       recommended method of identifying a math chip by
  17050.                       opcode instructions.
  17051.   
  17052.   Return value        returns a value identifying the math coprocessor.
  17053.                       See chiphk.h for further details.
  17054.   
  17055.   Note                Other (not 8087, 287 or 387) chips will not be
  17056.                       identified correctly.
  17057.   
  17058.                       For some reason this function keeps crashing on my
  17059.                       machine. Consider this function under works, not
  17060.                       necessarily finished. If you figure out what the
  17061.                       problem is, please let me know. I hope to have it
  17062.                       bug free by the next release, but time is at a
  17063.                       premium.
  17064.   
  17065.   See also            cpu_id(), machine_id()
  17066.   
  17067.  
  17068.  
  17069.  
  17070.  
  17071.  
  17072.  
  17073.  
  17074.  
  17075.  
  17076.  
  17077.  
  17078.  
  17079.  
  17080.  
  17081.  
  17082.  
  17083.  
  17084.  
  17085.  
  17086.  
  17087.  
  17088.  
  17089.  
  17090.  
  17091.  
  17092.  
  17093.  
  17094.  
  17095.  
  17096.  
  17097.  
  17098.  
  17099.  
  17100.      TCHK 2.1                                                    Page 260
  17101.  
  17102.   
  17103.   Function             nmid - is a number outside a range
  17104.   
  17105.   Syntax              #include <mathhk.h>
  17106.                       (boolean) nmid(a,x,b)
  17107.   
  17108.   Prototype in        mathhk.h
  17109.   
  17110.   Remarks             nmid checks if x is less than a or greater than b.
  17111.   
  17112.                       This function is a macro.
  17113.   
  17114.   Return value        returns TRUE if x is less than a or greater than b,
  17115.                       otherwise FALSE.
  17116.   
  17117.   See also            mid()
  17118.   
  17119.   
  17120.  
  17121.  
  17122.  
  17123.  
  17124.  
  17125.  
  17126.  
  17127.  
  17128.  
  17129.  
  17130.  
  17131.  
  17132.  
  17133.  
  17134.  
  17135.  
  17136.  
  17137.  
  17138.  
  17139.  
  17140.  
  17141.  
  17142.  
  17143.  
  17144.  
  17145.  
  17146.  
  17147.  
  17148.  
  17149.  
  17150.  
  17151.  
  17152.  
  17153.  
  17154.  
  17155.  
  17156.  
  17157.  
  17158.  
  17159.  
  17160.  
  17161.  
  17162.  
  17163.  
  17164.  
  17165.  
  17166.      TCHK 2.1                                                    Page 261
  17167.  
  17168.   
  17169.   Function             NumLock - set the Num Lock key state
  17170.   
  17171.   Syntax              void NumLock(boolean on);
  17172.   
  17173.   Prototype in        ibm.h
  17174.   
  17175.   Remarks             sets the Num Lock key state to the state selected
  17176.                       by the on parameter.
  17177.   
  17178.   Return value        nothing.
  17179.   
  17180.   See also            CapsLock(), InsLock(), ScrollLock()
  17181.   
  17182.  
  17183.  
  17184.  
  17185.  
  17186.  
  17187.  
  17188.  
  17189.  
  17190.  
  17191.  
  17192.  
  17193.  
  17194.  
  17195.  
  17196.  
  17197.  
  17198.  
  17199.  
  17200.  
  17201.  
  17202.  
  17203.  
  17204.  
  17205.  
  17206.  
  17207.  
  17208.  
  17209.  
  17210.  
  17211.  
  17212.  
  17213.  
  17214.  
  17215.  
  17216.  
  17217.  
  17218.  
  17219.  
  17220.  
  17221.  
  17222.  
  17223.  
  17224.  
  17225.  
  17226.  
  17227.  
  17228.  
  17229.  
  17230.  
  17231.  
  17232.      TCHK 2.1                                                    Page 262
  17233.  
  17234.   
  17235.   Function             parsefilename - parses a filename, supports paths
  17236.   
  17237.   Syntax              struct filespec *parsefilename(char *fspec);
  17238.   
  17239.   Prototype in        filehk.h
  17240.   
  17241.   Remarks             parsefilename parses a string pointed to by fspec
  17242.                       for a file name. The file name is placed in a
  17243.                       struct filespec as a drive, path, and filename.ext.
  17244.                       Wildcards are supported. The struct filespec is
  17245.                       returned as follows:
  17246.   
  17247.                            drive          NULL (\0) if not given, else
  17248.                                           drive letter
  17249.                            path           NULL string ("") if not given,
  17250.                                           else the path with a \ added to
  17251.                                           the end of the path string
  17252.                            filename.ext   NULL string ("") if no file
  17253.                                           name given, else a filename.ext
  17254.                                           as per standard DOS file names.
  17255.   
  17256.                       The filename.ext is not expanded (i.e. c:tchk.lib
  17257.                       has a filename.ext of tchk.lib, but c:tchk. has a
  17258.                       filename.ext of tchk., and c:tchk has a
  17259.                       filename.ext of tchk.).
  17260.   
  17261.                       parsefilename is intelligent enough to know that
  17262.                       c:. expands out to C:.\*.*, where . is a path.
  17263.   
  17264.                       parsefilename is very similar to Borland's
  17265.                       parsefnm(), except Borland's function does NOT
  17266.                       handle paths, whereas parsefilename will (since
  17267.                       parsefnm() is just a DOS call, and we all know who
  17268.                       writes that wonderful operating system MS-DOS,
  17269.                       don't we?)
  17270.   
  17271.                       Limited error checking is performed, so beware. The
  17272.                       string will be parsed properly, but errors due to
  17273.                       long strings (i.e. strlen(fspec) > 100) and other
  17274.                       miscellania can cause extensive damage due to
  17275.                       pointer manipulations.
  17276.   
  17277.                       Furthermore, an invalid string (i.e. C:\TC\;HK\Z.C)
  17278.                       will not be treated as an error. The string is
  17279.                       parsed from the beginning to look for a drive
  17280.                       letter, and scanned from the right to the left,
  17281.                       stopping at the first \. If a \ is found,
  17282.                       everything to the right of it is considered the
  17283.                       file name, everything to the left is the path
  17284.                       (excluding the drive). You are responsible for
  17285.                       making sure fspec is a valid DOS drive, path and
  17286.                       file name.
  17287.   
  17288.   
  17289.  
  17290.  
  17291.  
  17292.  
  17293.  
  17294.  
  17295.  
  17296.  
  17297.  
  17298.      TCHK 2.1                                                    Page 263
  17299.  
  17300.   Return value        parsefilename returns the DOS file name fspec
  17301.                       broken down into drive, path and filename.ext.
  17302.   
  17303.                       parsefilename returns a pointer to the storage
  17304.                       location containing the struct filespec, or NULL if
  17305.                       space could not be allocated.
  17306.   
  17307.   See also            getfilespec(), parsefnameext(), resolvepath()
  17308.   
  17309.   Example             see demopars.c
  17310.   
  17311.   
  17312.  
  17313.  
  17314.  
  17315.  
  17316.  
  17317.  
  17318.  
  17319.  
  17320.  
  17321.  
  17322.  
  17323.  
  17324.  
  17325.  
  17326.  
  17327.  
  17328.  
  17329.  
  17330.  
  17331.  
  17332.  
  17333.  
  17334.  
  17335.  
  17336.  
  17337.  
  17338.  
  17339.  
  17340.  
  17341.  
  17342.  
  17343.  
  17344.  
  17345.  
  17346.  
  17347.  
  17348.  
  17349.  
  17350.  
  17351.  
  17352.  
  17353.  
  17354.  
  17355.  
  17356.  
  17357.  
  17358.  
  17359.  
  17360.  
  17361.  
  17362.  
  17363.  
  17364.      TCHK 2.1                                                    Page 264
  17365.  
  17366.   
  17367.   Function             parsefnameext - parses a filename into name and
  17368.                                         extension
  17369.   
  17370.   Syntax              struct fnameext *parsefnameext(char *filename);
  17371.   
  17372.   Prototype in        filehk.h
  17373.   
  17374.   Remarks             parsefnameext parses a string pointed to by
  17375.                       filename into its elements, filename and extension.
  17376.                       The struct fnameext is returned with the file name
  17377.                       and extension as fixed length strings, padded with
  17378.                       spaces as necessary.
  17379.   
  17380.                       parsefnameext is useful for separating a DOS
  17381.                       filename into its discrete parts.
  17382.   
  17383.   Return value        parsefnameext returns the DOS file name filename
  17384.                       broken down into the structure fnameext as the name
  17385.                       and extension.
  17386.   
  17387.                       parsefnameext returns a pointer to the storage
  17388.                       location containing the struct fnameext, or NULL if
  17389.                       space could not be allocated.
  17390.   
  17391.   See also            getfilespec(), parsefilename(), resolvepath()
  17392.   
  17393.   Example             see demopars.c
  17394.   
  17395.   
  17396.  
  17397.  
  17398.  
  17399.  
  17400.  
  17401.  
  17402.  
  17403.  
  17404.  
  17405.  
  17406.  
  17407.  
  17408.  
  17409.  
  17410.  
  17411.  
  17412.  
  17413.  
  17414.  
  17415.  
  17416.  
  17417.  
  17418.  
  17419.  
  17420.  
  17421.  
  17422.  
  17423.  
  17424.  
  17425.  
  17426.  
  17427.  
  17428.  
  17429.  
  17430.      TCHK 2.1                                                    Page 265
  17431.  
  17432.   
  17433.   Function             pause - wait for a time or until a keypress
  17434.   
  17435.   Syntax              int pause(int wait);
  17436.   
  17437.   Prototype in        timehk.h
  17438.   
  17439.   Remarks             waits for a time, or until a key is pressed.
  17440.                       Similiar to delay(), but can be aborted by a
  17441.                       keypress. wait is given in 1/100s of a second
  17442.   
  17443.   Return value        returns zero if the time elapsed, otherwise the
  17444.                       scan code of the key pressed.
  17445.   
  17446.   
  17447.  
  17448.  
  17449.  
  17450.  
  17451.  
  17452.  
  17453.  
  17454.  
  17455.  
  17456.  
  17457.  
  17458.  
  17459.  
  17460.  
  17461.  
  17462.  
  17463.  
  17464.  
  17465.  
  17466.  
  17467.  
  17468.  
  17469.  
  17470.  
  17471.  
  17472.  
  17473.  
  17474.  
  17475.  
  17476.  
  17477.  
  17478.  
  17479.  
  17480.  
  17481.  
  17482.  
  17483.  
  17484.  
  17485.  
  17486.  
  17487.  
  17488.  
  17489.  
  17490.  
  17491.  
  17492.  
  17493.  
  17494.  
  17495.  
  17496.      TCHK 2.1                                                    Page 266
  17497.  
  17498.   
  17499.   Function             PMT - calculate the periodic payment required to
  17500.                               fully amortize a principal
  17501.   
  17502.   Syntax              double PMT(double principal, double interest, int
  17503.                                  periods)
  17504.   
  17505.   Prototype in        finance.h
  17506.   
  17507.   Remarks             PMT calculates the periodic payment required to
  17508.                       fully amortize a principal over some amount of
  17509.                       periods.
  17510.   
  17511.   Return value        returns the periodic payment required to fully
  17512.                       amortize a principal over an amount of periods.
  17513.   
  17514.   See also            FV(), FVa(), PV(), PVa()
  17515.   
  17516.   
  17517.  
  17518.  
  17519.  
  17520.  
  17521.  
  17522.  
  17523.  
  17524.  
  17525.  
  17526.  
  17527.  
  17528.  
  17529.  
  17530.  
  17531.  
  17532.  
  17533.  
  17534.  
  17535.  
  17536.  
  17537.  
  17538.  
  17539.  
  17540.  
  17541.  
  17542.  
  17543.  
  17544.  
  17545.  
  17546.  
  17547.  
  17548.  
  17549.  
  17550.  
  17551.  
  17552.  
  17553.  
  17554.  
  17555.  
  17556.  
  17557.  
  17558.  
  17559.  
  17560.  
  17561.  
  17562.      TCHK 2.1                                                    Page 267
  17563.  
  17564.   
  17565.   Function             popup_alloc - allocate memory for a popup menu
  17566.   
  17567.   Syntax              struct popup_header *popup_alloc(int left, int top,
  17568.                                      int right, int bottom, char *frame,
  17569.                                      char *title, int titlejustify, char
  17570.                                      *command[], int cmdkey[], char
  17571.                                      cmdflag[], int colframe, int
  17572.                                      coltitle, int colnorm, int
  17573.                                      colcmdkey, int colhilite, int
  17574.                                      coldisable, int coldishilite, int
  17575.                                      colnotopt, int defaultcommand,
  17576.                                      unsigned flags);
  17577.   
  17578.   Prototype in        menuhk.h
  17579.   
  17580.   Remarks             popup_alloc creates a popup menu with the following
  17581.                       information:
  17582.   
  17583.                       Coordinates of the frame of the popup menu are
  17584.                       (left,top) to (right,bottom), the border is made up
  17585.                       of the 9 or 11 chars in frame (0 to 8 or 10) as per
  17586.                       boxwindow(), with an optional title on the top edge
  17587.                       of the menu border, justified left, right or center
  17588.                       (see howard.h for more details).
  17589.   
  17590.                       The command array is a list of strings or text to
  17591.                       be displayed on the screen. popup_alloc knows how
  17592.                       many commands it needs by the size of the box, one
  17593.                       per line (i.e. coordinates (1,1) to (10,5) would
  17594.                       need 3 commands since there are 3 lines inside the
  17595.                       popup box).
  17596.   
  17597.                       Each command can have a hotkey associated with it,
  17598.                       denoted by the appropriate cmdkey[]. The 'hotkey'
  17599.                       is actually a one-touch key, instantly moving to
  17600.                       and selecting a choice. The cmdkey value is an
  17601.                       offset into the command string. For example, a
  17602.                       command "Edit" with a hotkey of the "E" would have
  17603.                       a cmdkey value of 0 (an offset from the beginning
  17604.                       of the command). A command without a hotkey has a
  17605.                       cmdkey value of -1.
  17606.   
  17607.                       Each command has an appropriate cmdflag field. A
  17608.                       command may be either:
  17609.   
  17610.                            ENABLED     - a valid choice
  17611.                            DISABLED    - displayed, but not selectable
  17612.                            NOTOPTION   - not a command (static text)
  17613.   
  17614.                       These are defined in menuhk.h. Other values may
  17615.                       cause unpredictable results.
  17616.   
  17617.   
  17618.  
  17619.  
  17620.  
  17621.  
  17622.  
  17623.  
  17624.  
  17625.  
  17626.  
  17627.  
  17628.      TCHK 2.1                                                    Page 268
  17629.  
  17630.                       The following colors are used:
  17631.   
  17632.                            colframe       - frame around menu
  17633.                            coltitle       - title (if any)
  17634.                            colnorm        - enabled commands
  17635.                            colcmdkey      - hotkey in command
  17636.                            colhilite      - currently hilited option
  17637.                            coldisable     - disabled options
  17638.                            coldishilite   - disabled and currently
  17639.                                             hilited
  17640.                            colnotopt      - static text (NOTOPTION)
  17641.   
  17642.                       defaultcommand is the command initially hilited. If
  17643.                       an invalid command is chosen (the command is static
  17644.                       text, or does not exist, etc.) the first valid
  17645.                       command is the default.
  17646.   
  17647.                       flags is a 2-byte bit field of flags
  17648.   
  17649.                            QEFxxxxH UDIRCEDW
  17650.   
  17651.                       where
  17652.   
  17653.                            Q = Quit after selection
  17654.                            E = ESC means quit
  17655.                            F = Free memory on quit
  17656.                            H = Hierarchial menu (not implemented yet)
  17657.   
  17658.                            U = call _idle_menu() after keyboard input
  17659.                            D = free time slices under DESQview
  17660.                            I = cmdkeys are case Independent
  17661.                            R = Restore cursor before returning
  17662.                            C = don't hide Cursor
  17663.                            E = Erase menu on free/cleanup
  17664.                            D = Disabled not hilitable
  17665.                            W = Wraparound
  17666.   
  17667.                       Briefly, Quit will restore the display to the state
  17668.                       it was in before the popup menu was called
  17669.                       (settextinfo(), etc.). With E, if ESC is pressed
  17670.                       the menu is removed, for any other selection no
  17671.                       cleanup is done (unless Q is specified). Free
  17672.                       memory on quit calls popup_free() after a selection
  17673.                       is made. Hierarchial menus are not implemented yet.
  17674.                       Keys are input via inkey(), inkeyc(), inkeydv() or
  17675.                       inkeycdv(), depending on case Independency and
  17676.                       freeeing time slices under DESQview. When
  17677.                       popup_get() is called, the cursor is hidden unless
  17678.                       C is given. The cursor is unhidden only if R is
  17679.                       given. E will cause the menu to be erased from the
  17680.                       screen if quitting. Disbaled commands are normally
  17681.                       selectable, unless D is on. Wraparound allows the
  17682.                       selecting hilite bar to wrap over the top and under
  17683.                       the bottom.
  17684.   
  17685.  
  17686.  
  17687.  
  17688.  
  17689.  
  17690.  
  17691.  
  17692.  
  17693.  
  17694.      TCHK 2.1                                                    Page 269
  17695.  
  17696.   
  17697.                       After input is polled, if the user defined function
  17698.                       flag is set (UDFIDLE) the function _idle_menu is
  17699.                       called. Currently, the definition of _idle_menu is:
  17700.   
  17701.                                 int _idle_menu(void)
  17702.   
  17703.                       Possible uses for such a function is an onscreen
  17704.                       clock, printing, or some other background task. In
  17705.                       the future _idle_menu() will receive releveant
  17706.                       parameters. To define _idle_menu as the user
  17707.                       defined function int myfunction(void), try:
  17708.   
  17709.                            _idle_menu = (far *)myfunction;
  17710.   
  17711.                       The full definition for _idle_menu() is:
  17712.   
  17713.                            int (far *_idle_menu)(void);
  17714.   
  17715.                       You should declare myfunction() as type int, with
  17716.                       void parameters, and you should typecast the
  17717.                       function as a far pointer when you assign it to
  17718.                       _idle_menu.
  17719.   
  17720.   Return value        allocates and returns a pointer to a popup header
  17721.                       structure if the menu was successfully created,
  17722.                       otherwise returns NULL if an error occurred.
  17723.                       popuperrno will have the following values:
  17724.   
  17725.                            0    success
  17726.                            1    error, could not allocate popup header
  17727.                            2    error, could not allocate videosave
  17728.                            3    error, could not allocate menusave
  17729.                            5    error, could not allocate popup field
  17730.                            6    error, could not allocate command string
  17731.                            7    error, no menu item enabled (no commands)
  17732.   
  17733.   Note                The popup_header structure contains important
  17734.                       information about the menu, including pointers to
  17735.                       linked lists for the fields, saved video displays,
  17736.                       etc. I strongly advise that you don't even think of
  17737.                       modifying this information yourself. Let the
  17738.                       popup...() functions handle it for you. These
  17739.                       functions have been developed and used over a
  17740.                       period of several months, programs and conditions
  17741.                       which proves them to be virtually bug free. If you
  17742.                       really want to mess with them yourself, feel free.
  17743.                       But I certainly wouldn't want to attempt it.
  17744.                       Modifying these functions even with the source code
  17745.                       is a headache.
  17746.   
  17747.   See also            menuhk.h
  17748.                       isHiliteable(), menu_popup(), popup_free(),
  17749.                       popup_get(), popup_restore(), popup_setcurrent(), 
  17750.  
  17751.  
  17752.  
  17753.  
  17754.  
  17755.  
  17756.  
  17757.  
  17758.  
  17759.  
  17760.      TCHK 2.1                                                    Page 270
  17761.  
  17762.                       pophilite(), popunlite()
  17763.                       popuperrno
  17764.   
  17765.   Example             see demopop.c
  17766.   
  17767.   
  17768.  
  17769.  
  17770.  
  17771.  
  17772.  
  17773.  
  17774.  
  17775.  
  17776.  
  17777.  
  17778.  
  17779.  
  17780.  
  17781.  
  17782.  
  17783.  
  17784.  
  17785.  
  17786.  
  17787.  
  17788.  
  17789.  
  17790.  
  17791.  
  17792.  
  17793.  
  17794.  
  17795.  
  17796.  
  17797.  
  17798.  
  17799.  
  17800.  
  17801.  
  17802.  
  17803.  
  17804.  
  17805.  
  17806.  
  17807.  
  17808.  
  17809.  
  17810.  
  17811.  
  17812.  
  17813.  
  17814.  
  17815.  
  17816.  
  17817.  
  17818.  
  17819.  
  17820.  
  17821.  
  17822.  
  17823.  
  17824.  
  17825.  
  17826.      TCHK 2.1                                                    Page 271
  17827.  
  17828.   
  17829.   Function             popup_free - frees memory allocated by popup menu
  17830.   
  17831.   Syntax              void popup_free(struct popup_header *ph);
  17832.   
  17833.   Prototype in        menuhk.h
  17834.   
  17835.   Remarks             frees all memory allocated to a popup menu.
  17836.   
  17837.   Return value        nothing.
  17838.   
  17839.   Note                see popup_alloc()
  17840.   
  17841.   See also            menuhk.h
  17842.                       isHiliteable(), menu_popup(), popup_alloc(),
  17843.                       popup_get(), popup_restore(), popup_setcurrent(),
  17844.                       pophilite(), popunlite()
  17845.                       popuperrno
  17846.   
  17847.   Example             see demopop.c
  17848.   
  17849.   
  17850.  
  17851.  
  17852.  
  17853.  
  17854.  
  17855.  
  17856.  
  17857.  
  17858.  
  17859.  
  17860.  
  17861.  
  17862.  
  17863.  
  17864.  
  17865.  
  17866.  
  17867.  
  17868.  
  17869.  
  17870.  
  17871.  
  17872.  
  17873.  
  17874.  
  17875.  
  17876.  
  17877.  
  17878.  
  17879.  
  17880.  
  17881.  
  17882.  
  17883.  
  17884.  
  17885.  
  17886.  
  17887.  
  17888.  
  17889.  
  17890.  
  17891.  
  17892.      TCHK 2.1                                                    Page 272
  17893.  
  17894.   
  17895.   Function             popup_get - get user's choice from a popup menu
  17896.   
  17897.   Syntax              int popup_get(struct popup_header *ph);
  17898.   
  17899.   Prototype in        menuhk.h
  17900.   
  17901.   Remarks             popup_get does the actual prompting the user for
  17902.                       input. The following keys can be used to navigate
  17903.                       in the menu:
  17904.   
  17905.                            Up Arrow       Move select bar up one option
  17906.                            Down Arrow     Move select bar down one option
  17907.                            Home           Move select bar to first option
  17908.                            End            Move select bar to last option
  17909.                            ENTER          Select the hilited option
  17910.                            ESC            Abort
  17911.   
  17912.                       in addition to any cmdkeys.
  17913.   
  17914.                       Other actions may be taken before returning from
  17915.                       this function, according to the flags for the menu.
  17916.                       See popup_alloc() for more details.
  17917.   
  17918.   Return value        returns zero if ESC was hit, otherwise returns the
  17919.                       number of the command selected. This is not the
  17920.                       array index of the command. If command[] has 3
  17921.                       static text items and a command, and the command is
  17922.                       selected, a 1 will be returned, even though the
  17923.                       command is the fourth command with a command index
  17924.                       of three (command[3]).
  17925.   
  17926.   See also            menuhk.h
  17927.                       isHiliteable(), menu_popup(), popup_alloc(),
  17928.                       popup_free(), popup_restore(), popup_setcurrent(),
  17929.                       pophilite(), popunlite()
  17930.                       popuperrno
  17931.   
  17932.   Example             see demopop.c
  17933.   
  17934.   
  17935.  
  17936.  
  17937.  
  17938.  
  17939.  
  17940.  
  17941.  
  17942.  
  17943.  
  17944.  
  17945.  
  17946.  
  17947.  
  17948.  
  17949.  
  17950.  
  17951.  
  17952.  
  17953.  
  17954.  
  17955.  
  17956.  
  17957.  
  17958.      TCHK 2.1                                                    Page 273
  17959.  
  17960.   
  17961.   Function             popup_restore - restore video from a popup menu
  17962.   
  17963.   Syntax              void popup_restore(struct popup_header *ph);
  17964.   
  17965.   Prototype in        menuhk.h
  17966.   
  17967.   Remarks             restores the display overlaid by a popup menu and
  17968.                       appropriate display information.
  17969.   
  17970.                       This function is used internally by several
  17971.                       popup...() menu functions.
  17972.   
  17973.   Return value        nothing.
  17974.   
  17975.   Note                This function is for internal uses only.
  17976.   
  17977.   See also            menuhk.h
  17978.                       isHiliteable(), menu_popup(), popup_alloc(),
  17979.                       popup_free(), popup_get(), popup_setcurrent(),
  17980.                       pophilite(), popunlite()
  17981.                       popuperrno
  17982.   
  17983.   
  17984.  
  17985.  
  17986.  
  17987.  
  17988.  
  17989.  
  17990.  
  17991.  
  17992.  
  17993.  
  17994.  
  17995.  
  17996.  
  17997.  
  17998.  
  17999.  
  18000.  
  18001.  
  18002.  
  18003.  
  18004.  
  18005.  
  18006.  
  18007.  
  18008.  
  18009.  
  18010.  
  18011.  
  18012.  
  18013.  
  18014.  
  18015.  
  18016.  
  18017.  
  18018.  
  18019.  
  18020.  
  18021.  
  18022.  
  18023.  
  18024.      TCHK 2.1                                                    Page 274
  18025.  
  18026.   
  18027.   Function             popup_setcurrent - set internal popup menu
  18028.                                            information
  18029.   
  18030.   Syntax              int popup_setcurrent(struct popup_header *ph,
  18031.                                            int current);
  18032.   Prototype in        
  18033.   
  18034.   Remarks             sets internal variables for a popup menu regarding
  18035.                       the currently hilited item.
  18036.   
  18037.                       This function is used internally by several
  18038.                       popup...() menu functions.
  18039.   
  18040.   Return value        returns return value for newly hilited command. IF
  18041.                       there are no other selectable commands, returns -1.
  18042.   
  18043.   Note                This function is for internal uses only.
  18044.   
  18045.   See also            menuhk.h
  18046.                       isHiliteable(), menu_popup(), popup_alloc(),
  18047.                       popup_free(), popup_get(), popup_restore(),
  18048.                       pophilite(), popunlite()
  18049.                       popuperrno
  18050.   
  18051.   
  18052.  
  18053.  
  18054.  
  18055.  
  18056.  
  18057.  
  18058.  
  18059.  
  18060.  
  18061.  
  18062.  
  18063.  
  18064.  
  18065.  
  18066.  
  18067.  
  18068.  
  18069.  
  18070.  
  18071.  
  18072.  
  18073.  
  18074.  
  18075.  
  18076.  
  18077.  
  18078.  
  18079.  
  18080.  
  18081.  
  18082.  
  18083.  
  18084.  
  18085.  
  18086.  
  18087.  
  18088.  
  18089.  
  18090.      TCHK 2.1                                                    Page 275
  18091.  
  18092.   
  18093.   Function             pophilite - hilite a popup menu command
  18094.   
  18095.   Syntax              void pophilite(struct popup_header *ph);
  18096.   
  18097.   Prototype in        menuhk.h
  18098.   
  18099.   Remarks             displays a popup menu command in the hilited color
  18100.                       via Borland's console i/o.
  18101.   
  18102.                       This function is used internally by several
  18103.                       popup...() menu functions.
  18104.   
  18105.   Return value        nothing.
  18106.   
  18107.   Note                This function is for internal uses only.
  18108.   
  18109.   See also            menuhk.h
  18110.                       isHiliteable(), menu_popup(), popup_alloc(),
  18111.                       popup_free(), popup_get(), popup_restore(),
  18112.                       popup_setcurrent(), popunlite()
  18113.                       popuperrno
  18114.   
  18115.   
  18116.  
  18117.  
  18118.  
  18119.  
  18120.  
  18121.  
  18122.  
  18123.  
  18124.  
  18125.  
  18126.  
  18127.  
  18128.  
  18129.  
  18130.  
  18131.  
  18132.  
  18133.  
  18134.  
  18135.  
  18136.  
  18137.  
  18138.  
  18139.  
  18140.  
  18141.  
  18142.  
  18143.  
  18144.  
  18145.  
  18146.  
  18147.  
  18148.  
  18149.  
  18150.  
  18151.  
  18152.  
  18153.  
  18154.  
  18155.  
  18156.      TCHK 2.1                                                    Page 276
  18157.  
  18158.   
  18159.   Function             popunlite - unhilite a popup menu command
  18160.   
  18161.   Syntax              void popunlite(struct popup_header *ph);
  18162.   
  18163.   Prototype in        menuhk.h
  18164.   
  18165.   Remarks             displays a popup menu command in its unhilited
  18166.                       color(s).
  18167.   
  18168.                       This function is used internally by several
  18169.                       popup...() menu functions.
  18170.   
  18171.   Return value        nothing.
  18172.   
  18173.   Note                This function is for internal uses only.
  18174.   
  18175.   See also            menuhk.h
  18176.                       isHiliteable(), menu_popup(), popup_alloc(),
  18177.                       popup_free(), popup_get(), popup_restore(),
  18178.                       popup_setcurrent(), pophilite()
  18179.                       popuperrno
  18180.   
  18181.   
  18182.  
  18183.  
  18184.  
  18185.  
  18186.  
  18187.  
  18188.  
  18189.  
  18190.  
  18191.  
  18192.  
  18193.  
  18194.  
  18195.  
  18196.  
  18197.  
  18198.  
  18199.  
  18200.  
  18201.  
  18202.  
  18203.  
  18204.  
  18205.  
  18206.  
  18207.  
  18208.  
  18209.  
  18210.  
  18211.  
  18212.  
  18213.  
  18214.  
  18215.  
  18216.  
  18217.  
  18218.  
  18219.  
  18220.  
  18221.  
  18222.      TCHK 2.1                                                    Page 277
  18223.  
  18224.   
  18225.   Function             print_screen - issue a PrintScreen
  18226.   
  18227.   Syntax              int print_screen(void);
  18228.   
  18229.   Prototype in        printhk.h
  18230.   
  18231.   Remarks             issues a Print Screen command as if PrtSc were
  18232.                       pressed.
  18233.   
  18234.   Return value        returns zero if the PrtSc is done, a one if the
  18235.                       PtrSc is in progress and 0xFF is an error occurred.
  18236.                       See printhk.h for further information.
  18237.   
  18238.   See also            isPRINTavail(), PRINTadd(), PRINThold(),
  18239.                       PRINTpurge(), PRINTremove(), PRINTresume
  18240.   
  18241.   
  18242.  
  18243.  
  18244.  
  18245.  
  18246.  
  18247.  
  18248.  
  18249.  
  18250.  
  18251.  
  18252.  
  18253.  
  18254.  
  18255.  
  18256.  
  18257.  
  18258.  
  18259.  
  18260.  
  18261.  
  18262.  
  18263.  
  18264.  
  18265.  
  18266.  
  18267.  
  18268.  
  18269.  
  18270.  
  18271.  
  18272.  
  18273.  
  18274.  
  18275.  
  18276.  
  18277.  
  18278.  
  18279.  
  18280.  
  18281.  
  18282.  
  18283.  
  18284.  
  18285.  
  18286.  
  18287.  
  18288.      TCHK 2.1                                                    Page 278
  18289.  
  18290.   
  18291.   Function             PRINTadd - add a file to the print queue
  18292.   
  18293.   Syntax              int PRINTadd(char *filename, int level);
  18294.   
  18295.   Prototype in        printhk.h
  18296.   
  18297.   Remarks             adds a file to the print queue. The filename may
  18298.                       NOT have wildcards. The priority level is
  18299.                       determined by level.
  18300.   
  18301.   Return value        returns zero if no error occurred, otherwise
  18302.                       returns the error code. See printhk.h for a full
  18303.                       list of the error return codes.
  18304.   
  18305.   Note                requires DOS 3.1 or greater.
  18306.   
  18307.   See also            isPRINTavail(), PRINThold(), PRINTpurge(),
  18308.                       PRINTremove(), PRINTresume
  18309.   
  18310.   
  18311.  
  18312.  
  18313.  
  18314.  
  18315.  
  18316.  
  18317.  
  18318.  
  18319.  
  18320.  
  18321.  
  18322.  
  18323.  
  18324.  
  18325.  
  18326.  
  18327.  
  18328.  
  18329.  
  18330.  
  18331.  
  18332.  
  18333.  
  18334.  
  18335.  
  18336.  
  18337.  
  18338.  
  18339.  
  18340.  
  18341.  
  18342.  
  18343.  
  18344.  
  18345.  
  18346.  
  18347.  
  18348.  
  18349.  
  18350.  
  18351.  
  18352.  
  18353.  
  18354.      TCHK 2.1                                                    Page 279
  18355.  
  18356.   
  18357.   Function             PRINThold - hold print queue for status read
  18358.   
  18359.   Syntax              int PRINThold(char far *queue);
  18360.   
  18361.   Prototype in        printhk.h
  18362.   
  18363.   Remarks             puts the print queue on hold and gets the status of
  18364.                       the print queue. The parameter queue is a far
  18365.                       pointer to a series of filename entries. Each entry
  18366.                       is 64 bytes long and contains a null terminated
  18367.                       string that is a file specification. The first file
  18368.                       specification in the queue is the one currently
  18369.                       being printed. The last slot in the queue is an
  18370.                       empty string (the first byte is '\0').
  18371.   
  18372.                       The print queue will not resume until a
  18373.                       PRINTresume() is issued.
  18374.   
  18375.   Return value        returns zero if no error occurred, otherwise
  18376.                       returns the error code. See printhk.h for a full
  18377.                       list of the error return codes.
  18378.   
  18379.   Note                requires DOS 3.1 or greater.
  18380.   
  18381.   See also            isPRINTavail(), PRINTadd(), PRINTpurge(),
  18382.                       PRINTremove(), PRINTresume
  18383.   
  18384.   
  18385.  
  18386.  
  18387.  
  18388.  
  18389.  
  18390.  
  18391.  
  18392.  
  18393.  
  18394.  
  18395.  
  18396.  
  18397.  
  18398.  
  18399.  
  18400.  
  18401.  
  18402.  
  18403.  
  18404.  
  18405.  
  18406.  
  18407.  
  18408.  
  18409.  
  18410.  
  18411.  
  18412.  
  18413.  
  18414.  
  18415.  
  18416.  
  18417.  
  18418.  
  18419.  
  18420.      TCHK 2.1                                                    Page 280
  18421.  
  18422.   
  18423.   Function             PRINTpurge - remove all files from print queue
  18424.   
  18425.   Syntax              int PRINTpurge(void);
  18426.   
  18427.   Prototype in        printhk.h
  18428.   
  18429.   Remarks             removes all files from the print queue.
  18430.   
  18431.   Return value        returns zero if no error occurred, otherwise
  18432.                       returns the error code. See printhk.h for a full
  18433.                       list of the error return codes.
  18434.   
  18435.   Note                requires DOS 3.1 or greater.
  18436.   
  18437.   See also            isPRINTavail(), PRINTadd(), PRINThold(),
  18438.                       PRINTremove(), PRINTresume
  18439.   
  18440.   
  18441.  
  18442.  
  18443.  
  18444.  
  18445.  
  18446.  
  18447.  
  18448.  
  18449.  
  18450.  
  18451.  
  18452.  
  18453.  
  18454.  
  18455.  
  18456.  
  18457.  
  18458.  
  18459.  
  18460.  
  18461.  
  18462.  
  18463.  
  18464.  
  18465.  
  18466.  
  18467.  
  18468.  
  18469.  
  18470.  
  18471.  
  18472.  
  18473.  
  18474.  
  18475.  
  18476.  
  18477.  
  18478.  
  18479.  
  18480.  
  18481.  
  18482.  
  18483.  
  18484.  
  18485.  
  18486.      TCHK 2.1                                                    Page 281
  18487.  
  18488.   
  18489.   Function             PRINTremove - remove a file from print queue
  18490.   
  18491.   Syntax              int PRINTremove(char *filename, int level);
  18492.   
  18493.   Prototype in        printhk.h
  18494.   
  18495.   Remarks             removes a file from the print queue. Wildcards are
  18496.                       allowed, so multiple files may be removed from the
  18497.                       queue with one call.
  18498.   
  18499.   Return value        returns zero if no error occurred, otherwise
  18500.                       returns the error code. See printhk.h for a full
  18501.                       list of the error return codes.
  18502.   
  18503.   Note                requires DOS 3.1 or greater.
  18504.   
  18505.   See also            isPRINTavail(), PRINTadd(), PRINThold(),
  18506.                       PRINTpurge(), PRINTresume
  18507.   
  18508.   
  18509.  
  18510.  
  18511.  
  18512.  
  18513.  
  18514.  
  18515.  
  18516.  
  18517.  
  18518.  
  18519.  
  18520.  
  18521.  
  18522.  
  18523.  
  18524.  
  18525.  
  18526.  
  18527.  
  18528.  
  18529.  
  18530.  
  18531.  
  18532.  
  18533.  
  18534.  
  18535.  
  18536.  
  18537.  
  18538.  
  18539.  
  18540.  
  18541.  
  18542.  
  18543.  
  18544.  
  18545.  
  18546.  
  18547.  
  18548.  
  18549.  
  18550.  
  18551.  
  18552.      TCHK 2.1                                                    Page 282
  18553.  
  18554.   
  18555.   Function             PRINTresume - resume printing after a PRINThold
  18556.   
  18557.   Syntax              int PRINTresume(void);
  18558.   
  18559.   Prototype in        printhk.h
  18560.   
  18561.   Remarks             resumes printing from the print queue after a
  18562.                       PRINTresume() has been issued. The print queue will
  18563.                       not resume until a PRINTresume() is issued.
  18564.   
  18565.   Return value        returns zero if no error occurred, otherwise
  18566.                       returns the error code. See printhk.h for a full
  18567.                       list of the error return codes.
  18568.   
  18569.   Note                requires DOS 3.1 or greater.
  18570.   
  18571.   See also            isPRINTavail(), PRINTadd(), PRINThold(),
  18572.                       PRINTpurge(), PRINTremove()
  18573.   
  18574.   
  18575.  
  18576.  
  18577.  
  18578.  
  18579.  
  18580.  
  18581.  
  18582.  
  18583.  
  18584.  
  18585.  
  18586.  
  18587.  
  18588.  
  18589.  
  18590.  
  18591.  
  18592.  
  18593.  
  18594.  
  18595.  
  18596.  
  18597.  
  18598.  
  18599.  
  18600.  
  18601.  
  18602.  
  18603.  
  18604.  
  18605.  
  18606.  
  18607.  
  18608.  
  18609.  
  18610.  
  18611.  
  18612.  
  18613.  
  18614.  
  18615.  
  18616.  
  18617.  
  18618.      TCHK 2.1                                                    Page 283
  18619.  
  18620.   
  18621.   Function             putk - put a character w/attribute on the screen
  18622.   
  18623.   Syntax              void putk(byte c);
  18624.   
  18625.   Prototype in        video.h
  18626.   
  18627.   Remarks             putk puts character c on the screen at the cursor
  18628.                       via INTerrupts. The cursor does NOT advance. The
  18629.                       attribute is set with the global variable
  18630.                       char_attribute.
  18631.   
  18632.   Return value        nothing.
  18633.   
  18634.   See also            putsay(), putstr(), set_color()
  18635.   
  18636.   Example             #include <video.h>
  18637.   
  18638.                       main()
  18639.                       {
  18640.                            gotohv(12,40);
  18641.                            putk('*');
  18642.                       }
  18643.   
  18644.  
  18645.  
  18646.  
  18647.  
  18648.  
  18649.  
  18650.  
  18651.  
  18652.  
  18653.  
  18654.  
  18655.  
  18656.  
  18657.  
  18658.  
  18659.  
  18660.  
  18661.  
  18662.  
  18663.  
  18664.  
  18665.  
  18666.  
  18667.  
  18668.  
  18669.  
  18670.  
  18671.  
  18672.  
  18673.  
  18674.  
  18675.  
  18676.  
  18677.  
  18678.  
  18679.  
  18680.  
  18681.  
  18682.  
  18683.  
  18684.      TCHK 2.1                                                    Page 284
  18685.  
  18686.   
  18687.   Function             putsay - put a string with attribute on the
  18688.                                  screen
  18689.   
  18690.   Syntax              void putsay(int col, int row, byte *c);
  18691.   
  18692.   Prototype in        video.h
  18693.   
  18694.   Remarks             putsay puts string c on the screen at location
  18695.                       (col,row) via direct screen writes. It does retrace
  18696.                       checking to prevent snow on CGA systems. The
  18697.                       attribute is set with the global variable
  18698.                       char_attribute.
  18699.   
  18700.   Return value        nothing.
  18701.   
  18702.   See also            putk(), putstr(), set_color()
  18703.   
  18704.   Example             #include <video.h>
  18705.   
  18706.                       main()
  18707.                       {
  18708.                            putstr(12,40,(byte *)"Hello");
  18709.                       }
  18710.   
  18711.  
  18712.  
  18713.  
  18714.  
  18715.  
  18716.  
  18717.  
  18718.  
  18719.  
  18720.  
  18721.  
  18722.  
  18723.  
  18724.  
  18725.  
  18726.  
  18727.  
  18728.  
  18729.  
  18730.  
  18731.  
  18732.  
  18733.  
  18734.  
  18735.  
  18736.  
  18737.  
  18738.  
  18739.  
  18740.  
  18741.  
  18742.  
  18743.  
  18744.  
  18745.  
  18746.  
  18747.  
  18748.  
  18749.  
  18750.      TCHK 2.1                                                    Page 285
  18751.  
  18752.   
  18753.   Function             putstr - put string with attribute on the screen
  18754.   
  18755.   Syntax              void putstr(byte *c);
  18756.   
  18757.   Prototype in        video.h
  18758.   
  18759.   Remarks             putstr puts string c on the screen at the cursor
  18760.                       via INTerrupts. When finished the cursor will be 1
  18761.                       spot after the string. The attribute is set with
  18762.                       the global variable char_attribute.
  18763.   
  18764.   Return value        nothing.
  18765.   
  18766.   See also            putk(), putsay(), set_color()
  18767.   
  18768.   Example             #include <video.h>
  18769.   
  18770.                       main()
  18771.                       {
  18772.                            gotohv(12,40);
  18773.                            putstr((byte *)"Hello");
  18774.                       }
  18775.   
  18776.  
  18777.  
  18778.  
  18779.  
  18780.  
  18781.  
  18782.  
  18783.  
  18784.  
  18785.  
  18786.  
  18787.  
  18788.  
  18789.  
  18790.  
  18791.  
  18792.  
  18793.  
  18794.  
  18795.  
  18796.  
  18797.  
  18798.  
  18799.  
  18800.  
  18801.  
  18802.  
  18803.  
  18804.  
  18805.  
  18806.  
  18807.  
  18808.  
  18809.  
  18810.  
  18811.  
  18812.  
  18813.  
  18814.  
  18815.  
  18816.      TCHK 2.1                                                    Page 286
  18817.  
  18818.   
  18819.   Function             PV - calculate the Present Value of a single
  18820.                              amount
  18821.   
  18822.   Syntax              double PV(double payment, double interest, int
  18823.                                 periods)
  18824.   
  18825.   Prototype in        finance.h
  18826.   
  18827.   Remarks             PV calculates the Present Value of a single amount
  18828.                       given the future value of the principal, the
  18829.                       interest rate per period and the number of periods.
  18830.   
  18831.   Return value        returns the present value of a single amount.
  18832.   
  18833.   See also            FV(), FVa(), PMT(), PVa()
  18834.   
  18835.   
  18836.  
  18837.  
  18838.  
  18839.  
  18840.  
  18841.  
  18842.  
  18843.  
  18844.  
  18845.  
  18846.  
  18847.  
  18848.  
  18849.  
  18850.  
  18851.  
  18852.  
  18853.  
  18854.  
  18855.  
  18856.  
  18857.  
  18858.  
  18859.  
  18860.  
  18861.  
  18862.  
  18863.  
  18864.  
  18865.  
  18866.  
  18867.  
  18868.  
  18869.  
  18870.  
  18871.  
  18872.  
  18873.  
  18874.  
  18875.  
  18876.  
  18877.  
  18878.  
  18879.  
  18880.  
  18881.  
  18882.      TCHK 2.1                                                    Page 287
  18883.  
  18884.   
  18885.   Function             PVa - calculate the Present Value of an annuity
  18886.   
  18887.   Syntax              double PVa(double payment, double interest, int
  18888.                                  periods)
  18889.   
  18890.   Prototype in        finance.h
  18891.   
  18892.   Remarks             PVa calculates the Present Value of an annuity
  18893.                       given the amount of each payment, the interest rate
  18894.                       per period and the number of periods.
  18895.   
  18896.   Return value        returns the present value of an annuity.
  18897.   
  18898.   See also            FV(), FVa(), PMT(), PV()
  18899.   
  18900.   
  18901.  
  18902.  
  18903.  
  18904.  
  18905.  
  18906.  
  18907.  
  18908.  
  18909.  
  18910.  
  18911.  
  18912.  
  18913.  
  18914.  
  18915.  
  18916.  
  18917.  
  18918.  
  18919.  
  18920.  
  18921.  
  18922.  
  18923.  
  18924.  
  18925.  
  18926.  
  18927.  
  18928.  
  18929.  
  18930.  
  18931.  
  18932.  
  18933.  
  18934.  
  18935.  
  18936.  
  18937.  
  18938.  
  18939.  
  18940.  
  18941.  
  18942.  
  18943.  
  18944.  
  18945.  
  18946.  
  18947.  
  18948.      TCHK 2.1                                                    Page 288
  18949.  
  18950.   
  18951.   Function             radd - add two REAL numbers
  18952.   
  18953.   Syntax              struct REAL radd(struct REAL val, struct REAL sval,
  18954.                                        int precision);
  18955.   
  18956.   Prototype in        real.h
  18957.   
  18958.   Remarks             val and sval are added together. The result will
  18959.                       have precision decimal places. See rsub() for more
  18960.                       details.
  18961.   
  18962.   Return value        returns val plus sval to the specified precision.
  18963.                       See rsub() for further details.
  18964.   
  18965.   See also            _r_minpre, _rmatherr
  18966.                       rceil(), rdiv(), rfloor(), rnegate(), rnormalize(),
  18967.                       rsign(), rsub()
  18968.   
  18969.   
  18970.  
  18971.  
  18972.  
  18973.  
  18974.  
  18975.  
  18976.  
  18977.  
  18978.  
  18979.  
  18980.  
  18981.  
  18982.  
  18983.  
  18984.  
  18985.  
  18986.  
  18987.  
  18988.  
  18989.  
  18990.  
  18991.  
  18992.  
  18993.  
  18994.  
  18995.  
  18996.  
  18997.  
  18998.  
  18999.  
  19000.  
  19001.  
  19002.  
  19003.  
  19004.  
  19005.  
  19006.  
  19007.  
  19008.  
  19009.  
  19010.  
  19011.  
  19012.  
  19013.  
  19014.      TCHK 2.1                                                    Page 289
  19015.  
  19016.   
  19017.   Function             rceil - rounds up
  19018.   
  19019.   Syntax              long rceil(struct REAL rx);
  19020.   
  19021.   Prototype in        real.h
  19022.   
  19023.   Remarks             rceil finds the smallest integer not less than rx.
  19024.   
  19025.                       Refer to the section SIMULATED FP MATH for further
  19026.                       details.
  19027.   
  19028.   Return value        rceil returns the integer found (as a long).
  19029.   
  19030.   See also            _r_minpre, _rmatherr
  19031.                       radd(), rdiv(), rfloor(), rnegate(), rnormalize(),
  19032.                       rsign(), rsub()
  19033.   
  19034.   
  19035.  
  19036.  
  19037.  
  19038.  
  19039.  
  19040.  
  19041.  
  19042.  
  19043.  
  19044.  
  19045.  
  19046.  
  19047.  
  19048.  
  19049.  
  19050.  
  19051.  
  19052.  
  19053.  
  19054.  
  19055.  
  19056.  
  19057.  
  19058.  
  19059.  
  19060.  
  19061.  
  19062.  
  19063.  
  19064.  
  19065.  
  19066.  
  19067.  
  19068.  
  19069.  
  19070.  
  19071.  
  19072.  
  19073.  
  19074.  
  19075.  
  19076.  
  19077.  
  19078.  
  19079.  
  19080.      TCHK 2.1                                                    Page 290
  19081.  
  19082.   
  19083.   Function             rdiv - divide using REAL math
  19084.   
  19085.   Syntax              struct REAL rdiv(long int numer, long int denom,
  19086.                                        int precision);
  19087.   
  19088.   Prototype in        real.h
  19089.   
  19090.   Remarks             rdiv divides numer by denom to precision decimal
  19091.                       places, returning the quotient as a REAL. The
  19092.                       actual value is calculated to precision+1 accuracy
  19093.                       and rounded to precision accuracy.
  19094.   
  19095.                       Errors, such as division by zero and requests for a
  19096.                       quotient with a precision larger than the maximum
  19097.                       precision allowed, are trapped and the returned
  19098.                       structure's rint and rfrac values will be -1. If
  19099.                       division by zero occurs, precision will be -1 and
  19100.                       the error code will be RDIVBYZERO. If the precision
  19101.                       requested is greater than the maximum allowed
  19102.                       precision, precision will be set to MAXPRECISION
  19103.                       and the error code will be RPLOSS.
  19104.   
  19105.                       Refer to the section SIMULATED FP MATH for further
  19106.                       details.
  19107.   
  19108.   Return value        returns numer divided by denom as a REAL with
  19109.                       precision decimal places. If an error occurred, the
  19110.                       returned structure's values will all be -1 (rint,
  19111.                       rfrac and precision) and _rmatherr will contain the
  19112.                       error code.
  19113.   
  19114.   See also            _rmatherr
  19115.                       radd(), rceil(), rfloor(), rnegate(), rnormalize(),
  19116.                       rsign(), rsub()
  19117.   
  19118.   
  19119.  
  19120.  
  19121.  
  19122.  
  19123.  
  19124.  
  19125.  
  19126.  
  19127.  
  19128.  
  19129.  
  19130.  
  19131.  
  19132.  
  19133.  
  19134.  
  19135.  
  19136.  
  19137.  
  19138.  
  19139.  
  19140.  
  19141.  
  19142.  
  19143.  
  19144.  
  19145.  
  19146.      TCHK 2.1                                                    Page 291
  19147.  
  19148.   
  19149.   Function             read_attrib - gets the attribute under the cursor
  19150.   
  19151.   Syntax              byte read_attrib(void);
  19152.   
  19153.   Prototype in        video.h
  19154.   
  19155.   Remarks             gets the attribute under the cursor via INT 0x10,
  19156.                       Function 9.
  19157.   
  19158.   Return value        returns the attribute under the cursor.
  19159.   
  19160.   See also            read_char()
  19161.   
  19162.   
  19163.  
  19164.  
  19165.  
  19166.  
  19167.  
  19168.  
  19169.  
  19170.  
  19171.  
  19172.  
  19173.  
  19174.  
  19175.  
  19176.  
  19177.  
  19178.  
  19179.  
  19180.  
  19181.  
  19182.  
  19183.  
  19184.  
  19185.  
  19186.  
  19187.  
  19188.  
  19189.  
  19190.  
  19191.  
  19192.  
  19193.  
  19194.  
  19195.  
  19196.  
  19197.  
  19198.  
  19199.  
  19200.  
  19201.  
  19202.  
  19203.  
  19204.  
  19205.  
  19206.  
  19207.  
  19208.  
  19209.  
  19210.  
  19211.  
  19212.      TCHK 2.1                                                    Page 292
  19213.  
  19214.   
  19215.   Function             read_char - gets the character under the cursor
  19216.   
  19217.   Syntax              byte read_char(void);
  19218.   
  19219.   Prototype in        video.h
  19220.   
  19221.   Remarks             gets the character under the cursor via INT 0x10,
  19222.                       Function 9.
  19223.   
  19224.   Return value        returns the character under the cursor.
  19225.   
  19226.   See also            read_attrib()
  19227.   
  19228.   
  19229.  
  19230.  
  19231.  
  19232.  
  19233.  
  19234.  
  19235.  
  19236.  
  19237.  
  19238.  
  19239.  
  19240.  
  19241.  
  19242.  
  19243.  
  19244.  
  19245.  
  19246.  
  19247.  
  19248.  
  19249.  
  19250.  
  19251.  
  19252.  
  19253.  
  19254.  
  19255.  
  19256.  
  19257.  
  19258.  
  19259.  
  19260.  
  19261.  
  19262.  
  19263.  
  19264.  
  19265.  
  19266.  
  19267.  
  19268.  
  19269.  
  19270.  
  19271.  
  19272.  
  19273.  
  19274.  
  19275.  
  19276.  
  19277.  
  19278.      TCHK 2.1                                                    Page 293
  19279.  
  19280.   
  19281.   Function             read_cursor - reads cursor information
  19282.   
  19283.   Syntax              unsigned int read_cursor(int *row, int *col);
  19284.   
  19285.   Prototype in        video.h
  19286.   
  19287.   Remarks             reads the cursor location and scan lines via
  19288.                       INTerrupts.
  19289.   
  19290.   Return value        returns the scan lines of the cursor as a word, the
  19291.                       high order byte the start and low order byte the
  19292.                       end.
  19293.   
  19294.   See also            cursor_blink(), cursor_flip(), cursor_off(),
  19295.                       cursor_on(), getcursor(), set_cursor(),
  19296.                       setcursor(), whereh(), wherev()
  19297.   
  19298.   Example             #include <video.h>
  19299.   
  19300.                       main()
  19301.                       {
  19302.                            int x,y;
  19303.                            unsigned int scan;
  19304.   
  19305.                            scan = read_cursor(&x,&y);
  19306.                            printf("Scan start %d and end %d\n",
  19307.                                 scan&0xFF00, scan&0xFF);
  19308.                       }
  19309.   
  19310.   Program output      Scan start 6 and end 7         /* on CGA */
  19311.   
  19312.  
  19313.  
  19314.  
  19315.  
  19316.  
  19317.  
  19318.  
  19319.  
  19320.  
  19321.  
  19322.  
  19323.  
  19324.  
  19325.  
  19326.  
  19327.  
  19328.  
  19329.  
  19330.  
  19331.  
  19332.  
  19333.  
  19334.  
  19335.  
  19336.  
  19337.  
  19338.  
  19339.  
  19340.  
  19341.  
  19342.  
  19343.  
  19344.      TCHK 2.1                                                    Page 294
  19345.  
  19346.   
  19347.   Function             read_mode - find screen width, mode and page
  19348.   
  19349.   Syntax              void read_mode(byte *width, byte *mode,
  19350.                                      byte *page);
  19351.   
  19352.   Prototype in        video.h
  19353.   
  19354.   Remarks             detects the screen width (number of columns,) video
  19355.                       mode and video page via INT 0x10, Service 0x0F.
  19356.   
  19357.   Return value        nothing.
  19358.   
  19359.   See also            video.h
  19360.                       set_mode()
  19361.   
  19362.   Example             #include <video.h>
  19363.   
  19364.                       main()
  19365.                       {
  19366.                            byte width, mode, page;
  19367.   
  19368.                            read_mode(&width, &mode, &page);
  19369.                            printf("# columns: %d  Mode: %d  Page: %d\n",
  19370.                                   width, mode, page);
  19371.                       }
  19372.   
  19373.   Program output      # columns: 80    Mode: 3   Page: 1
  19374.   
  19375.  
  19376.  
  19377.  
  19378.  
  19379.  
  19380.  
  19381.  
  19382.  
  19383.  
  19384.  
  19385.  
  19386.  
  19387.  
  19388.  
  19389.  
  19390.  
  19391.  
  19392.  
  19393.  
  19394.  
  19395.  
  19396.  
  19397.  
  19398.  
  19399.  
  19400.  
  19401.  
  19402.  
  19403.  
  19404.  
  19405.  
  19406.  
  19407.  
  19408.  
  19409.  
  19410.      TCHK 2.1                                                    Page 295
  19411.  
  19412.   
  19413.   Function             reboot - reboots the machine
  19414.   
  19415.   Syntax              void reboot(boolean warmboot);
  19416.   
  19417.   Prototype in        ibm.h
  19418.   
  19419.   Remarks             calling this function will reboot your machine via
  19420.                       the ROM reboot code located at F000:000. You can
  19421.                       specify a warm or cold boot (like hitting
  19422.                       CTRL-ALT-DEL or turning the power on.)
  19423.   
  19424.   Return value        nothing.
  19425.   
  19426.   Example             #include <ibm.h>
  19427.   
  19428.                       main()
  19429.                       {
  19430.                            boolean bootstyle;
  19431.   
  19432.                            /* set bootstyle */
  19433.                            reboot(bootstyle);
  19434.                       }
  19435.   
  19436.  
  19437.  
  19438.  
  19439.  
  19440.  
  19441.  
  19442.  
  19443.  
  19444.  
  19445.  
  19446.  
  19447.  
  19448.  
  19449.  
  19450.  
  19451.  
  19452.  
  19453.  
  19454.  
  19455.  
  19456.  
  19457.  
  19458.  
  19459.  
  19460.  
  19461.  
  19462.  
  19463.  
  19464.  
  19465.  
  19466.  
  19467.  
  19468.  
  19469.  
  19470.  
  19471.  
  19472.  
  19473.  
  19474.  
  19475.  
  19476.      TCHK 2.1                                                    Page 296
  19477.  
  19478.   
  19479.   Function             ResetPointDevice - Pointing Device BIOS Interface
  19480.                                            Reset Interface
  19481.   
  19482.   Syntax              int ResetPointDevice(void);
  19483.   
  19484.   Prototype in        ibm.h
  19485.   
  19486.   Remarks             ResetPointDevice() will reset the pointing device
  19487.                       interface.
  19488.   
  19489.   Return value        returns the device id on success and -1 on failure.
  19490.                       The success code is stored in Borland's global
  19491.                       variable errno. Here are the possible error values:
  19492.   
  19493.                            0x00      Success
  19494.                            0x01      Invalid function
  19495.                            0x02      Invalid input
  19496.                            0x03      Interface error
  19497.                            0x04      Need to resend
  19498.                            0x05      No device handler installed
  19499.   
  19500.                       Because the device id is returned, you should cross
  19501.                       check any returned value of -1 with errno to insure
  19502.                       the function did fail. Only if -1 is returned AND
  19503.                       errno != 0 did the function fail.
  19504.   
  19505.   Note                This function is only available on PS/2 machines or
  19506.                       under DESQview 2.x.
  19507.   
  19508.   See also            GetTypePointDevice(), SetPointDevice(),
  19509.                       SetRatePointDevice(), SetResPointDevice()
  19510.   
  19511.   
  19512.  
  19513.  
  19514.  
  19515.  
  19516.  
  19517.  
  19518.  
  19519.  
  19520.  
  19521.  
  19522.  
  19523.  
  19524.  
  19525.  
  19526.  
  19527.  
  19528.  
  19529.  
  19530.  
  19531.  
  19532.  
  19533.  
  19534.  
  19535.  
  19536.  
  19537.  
  19538.  
  19539.  
  19540.  
  19541.  
  19542.      TCHK 2.1                                                    Page 297
  19543.  
  19544.   
  19545.   Function             resolvepath - resolve a path to a fully qualified
  19546.                                       path
  19547.   
  19548.   Syntax              char *resolvepath(char *str, char *buffer);
  19549.   
  19550.   Prototype in        filehk.h
  19551.   
  19552.   Remarks             resolvepath uses an internal DOS Function (0x60)
  19553.                       only available under DOS 3.x (and probably later
  19554.                       versions.) The path string is expanded into a fully
  19555.                       qualified path with the results placed in buffer.
  19556.   
  19557.                       Borland provides access to a similar function
  19558.                       parsfnm() which calls a DOS function. However,
  19559.                       parsfnm() can NOT handle paths (drive, filename and
  19560.                       extension only.)
  19561.   
  19562.   Return value        returns a pointer to buffer.
  19563.   
  19564.   See also            getfilespec(), parsefilename(), parsefnameext()
  19565.   
  19566.   
  19567.  
  19568.  
  19569.  
  19570.  
  19571.  
  19572.  
  19573.  
  19574.  
  19575.  
  19576.  
  19577.  
  19578.  
  19579.  
  19580.  
  19581.  
  19582.  
  19583.  
  19584.  
  19585.  
  19586.  
  19587.  
  19588.  
  19589.  
  19590.  
  19591.  
  19592.  
  19593.  
  19594.  
  19595.  
  19596.  
  19597.  
  19598.  
  19599.  
  19600.  
  19601.  
  19602.  
  19603.  
  19604.  
  19605.  
  19606.  
  19607.  
  19608.      TCHK 2.1                                                    Page 298
  19609.  
  19610.   
  19611.   Function             rfloor - rounds down
  19612.   
  19613.   Syntax              long rfloor(struct REAL rx);
  19614.   
  19615.   Prototype in        real.h
  19616.   
  19617.   Remarks             rfloor finds the largest integer not greater than
  19618.                       rx.
  19619.   
  19620.                       Refer to the section SIMULATED FP MATH for further
  19621.                       details.
  19622.   
  19623.   Return value        rfloor returns the integer found (as a long).
  19624.   
  19625.   See also            _r_minpre, _rmatherr
  19626.                       radd(), rceil(), rdiv(), rnegate(), rnormalize(),
  19627.                       rsign(), rsub()
  19628.   
  19629.   
  19630.  
  19631.  
  19632.  
  19633.  
  19634.  
  19635.  
  19636.  
  19637.  
  19638.  
  19639.  
  19640.  
  19641.  
  19642.  
  19643.  
  19644.  
  19645.  
  19646.  
  19647.  
  19648.  
  19649.  
  19650.  
  19651.  
  19652.  
  19653.  
  19654.  
  19655.  
  19656.  
  19657.  
  19658.  
  19659.  
  19660.  
  19661.  
  19662.  
  19663.  
  19664.  
  19665.  
  19666.  
  19667.  
  19668.  
  19669.  
  19670.  
  19671.  
  19672.  
  19673.  
  19674.      TCHK 2.1                                                    Page 299
  19675.  
  19676.   
  19677.   Function             rightstr - return the right portion of a string
  19678.   
  19679.   Syntax              char *rightstr(char *source, int len);
  19680.   
  19681.   Prototype in        stringhk.h
  19682.   
  19683.   Remarks             rightstr performs just like its BASIC counterpart
  19684.                       MID$().
  19685.   
  19686.                       rightstr returns the middle part of a string.
  19687.   
  19688.   Return value        rightstr returns the rightmost len characters of
  19689.                       source. If the length of source is less than len,
  19690.                       the entire string is returned.
  19691.   
  19692.                       rightstr returns a pointer to the storage location
  19693.                       containing the new string, or NULL if space could
  19694.                       not be allocated.
  19695.   
  19696.   See also            leftstr(), midstr()
  19697.   
  19698.   Example             #include <stringhk.h>
  19699.                       #include <stdio.h>            /* for the printf */
  19700.   
  19701.                       main()
  19702.                       {
  19703.                            char msg[25], *r;
  19704.   
  19705.                            strcpy(msg,"This is another test");
  19706.                            r = right(msg,7);
  19707.                            printf("%s\n",msg);
  19708.                            printf("%s\n",r);
  19709.                       }
  19710.   
  19711.   Program output      This is another test
  19712.                       er test
  19713.   
  19714.   
  19715.  
  19716.  
  19717.  
  19718.  
  19719.  
  19720.  
  19721.  
  19722.  
  19723.  
  19724.  
  19725.  
  19726.  
  19727.  
  19728.  
  19729.  
  19730.  
  19731.  
  19732.  
  19733.  
  19734.  
  19735.  
  19736.  
  19737.  
  19738.  
  19739.  
  19740.      TCHK 2.1                                                    Page 300
  19741.  
  19742.   
  19743.   Function             rnegate - change sign
  19744.   
  19745.   Syntax              struct REAL *rnegate(struct REAL *rx);
  19746.   
  19747.   Prototype in        real.h
  19748.   
  19749.   Remarks             rnegate changes the sign of rx. Since REALs are
  19750.                       structures and not actual variables, you cannot
  19751.                       simply say rx = -rx;
  19752.   
  19753.                       Refer to the section SIMULATED FP MATH for further
  19754.                       details.
  19755.   
  19756.   Return value        rnegate returns a pointer to the negated real rx.
  19757.   
  19758.   See also            _r_minpre, _rmatherr
  19759.                       radd(), rceil(), rdiv(), rfloor(), rnormalize(),
  19760.                       rsign(), rsub()
  19761.   
  19762.   
  19763.  
  19764.  
  19765.  
  19766.  
  19767.  
  19768.  
  19769.  
  19770.  
  19771.  
  19772.  
  19773.  
  19774.  
  19775.  
  19776.  
  19777.  
  19778.  
  19779.  
  19780.  
  19781.  
  19782.  
  19783.  
  19784.  
  19785.  
  19786.  
  19787.  
  19788.  
  19789.  
  19790.  
  19791.  
  19792.  
  19793.  
  19794.  
  19795.  
  19796.  
  19797.  
  19798.  
  19799.  
  19800.  
  19801.  
  19802.  
  19803.  
  19804.  
  19805.  
  19806.      TCHK 2.1                                                    Page 301
  19807.  
  19808.   
  19809.   Function             rnormalize - fix precision
  19810.   
  19811.   Syntax              void rnormalize(struct REAL *r1, struct REAL *r2);
  19812.   
  19813.   Prototype in        real.h
  19814.   
  19815.   Remarks             rnormalize normalizes the precision of the reals r1
  19816.                       and r2, such that both values have equal precision.
  19817.                       Only the precision and fractional portion of the
  19818.                       real adjusted will be modified.
  19819.   
  19820.                       If _r_maximum is TRUE, the number with the smaller
  19821.                       precision has its fractional portion extended to
  19822.                       match the precision of the other real. If
  19823.                       _r_maximum is FALSE, the number with the larger
  19824.                       precision has its fractional portion truncated to
  19825.                       match the precision of the other real.
  19826.   
  19827.                       After returning, the global variables _r_maxpre and
  19828.                       _r_minpre will contain the minimum and maximum
  19829.                       precision of the reals r1 and r2 before any
  19830.                       adjustments were made.
  19831.   
  19832.                       Refer to the section SIMULATED FP MATH for further
  19833.                       details.
  19834.   
  19835.   Return value        nothing.
  19836.   
  19837.   See also            _r_maximum, _r_maxpre, _r_minpre
  19838.                       radd(), rceil(), rdiv(), rfloor(), rnegate(),
  19839.                       rsign(), rsub()
  19840.   
  19841.   
  19842.  
  19843.  
  19844.  
  19845.  
  19846.  
  19847.  
  19848.  
  19849.  
  19850.  
  19851.  
  19852.  
  19853.  
  19854.  
  19855.  
  19856.  
  19857.  
  19858.  
  19859.  
  19860.  
  19861.  
  19862.  
  19863.  
  19864.  
  19865.  
  19866.  
  19867.  
  19868.  
  19869.  
  19870.  
  19871.  
  19872.      TCHK 2.1                                                    Page 302
  19873.  
  19874.   
  19875.   Function             ROM_date - gets the ROM id date
  19876.   
  19877.   Syntax              byte ROM_date(void);
  19878.   
  19879.   Prototype in        ibm.h
  19880.   
  19881.   Remarks             finds the ROM id date at F000:FFF5
  19882.   
  19883.   Return value        returns a pointer to the storage location
  19884.                       containing the string, or NULL if space could not
  19885.                       be allocated.
  19886.   
  19887.   See also            ibm.h
  19888.                       machine_id(), ROM_id()
  19889.   
  19890.   Example             #include <ibm.h>
  19891.                       #include <stdio.h>
  19892.   
  19893.                       main()
  19894.                       {
  19895.                            printf("ROM BIOS date = %s",ROM_date());
  19896.                       }
  19897.   
  19898.   Program output      ROM BIOS date = 06/10/85
  19899.   
  19900.  
  19901.  
  19902.  
  19903.  
  19904.  
  19905.  
  19906.  
  19907.  
  19908.  
  19909.  
  19910.  
  19911.  
  19912.  
  19913.  
  19914.  
  19915.  
  19916.  
  19917.  
  19918.  
  19919.  
  19920.  
  19921.  
  19922.  
  19923.  
  19924.  
  19925.  
  19926.  
  19927.  
  19928.  
  19929.  
  19930.  
  19931.  
  19932.  
  19933.  
  19934.  
  19935.  
  19936.  
  19937.  
  19938.      TCHK 2.1                                                    Page 303
  19939.  
  19940.   
  19941.   Function             ROM_id - gets the ROM id byte
  19942.   
  19943.   Syntax              byte ROM_id(void);
  19944.   
  19945.   Prototype in        ibm.h
  19946.   
  19947.   Remarks             finds the ROM id byte at F000:FFFE
  19948.   
  19949.   Return value        returns the ROM id byte
  19950.   
  19951.   Note                on Compaq machines the ROM id byte is found at a
  19952.                       memory location close to, but not at, F000:FFFE.
  19953.                       Not having access to a Compaq, I did not include a
  19954.                       check for this. Maybe a future version...
  19955.   
  19956.   See also            ibm.h
  19957.                       machine_id(), ROM_date()
  19958.   
  19959.   Example             #include <ibm.h>
  19960.                       #include <stdio.h>
  19961.   
  19962.                       main()
  19963.                       {
  19964.                            printf("ROM id byte = %X",ROM_id());
  19965.                       }
  19966.   
  19967.   Program output      ROM id byte = FF
  19968.   
  19969.  
  19970.  
  19971.  
  19972.  
  19973.  
  19974.  
  19975.  
  19976.  
  19977.  
  19978.  
  19979.  
  19980.  
  19981.  
  19982.  
  19983.  
  19984.  
  19985.  
  19986.  
  19987.  
  19988.  
  19989.  
  19990.  
  19991.  
  19992.  
  19993.  
  19994.  
  19995.  
  19996.  
  19997.  
  19998.  
  19999.  
  20000.  
  20001.  
  20002.  
  20003.  
  20004.      TCHK 2.1                                                    Page 304
  20005.  
  20006.   
  20007.   Function             round - round a real to a decimal place
  20008.   
  20009.   Syntax              double round(double x, int n);
  20010.   
  20011.   Prototype in        mathhk.h
  20012.   
  20013.   Remarks             round will round off a double to x amount of
  20014.                       decimal places. Only zero or greater values are
  20015.                       valid for n (non-zegative). No error checking is
  20016.                       done.
  20017.   
  20018.   Return value        returns x rounded to n decimal places.
  20019.   
  20020.   See also            frac()
  20021.   
  20022.   Example             #include <mathhk.h>
  20023.   
  20024.                       main()
  20025.                       {
  20026.                            printf("Round %lf to %d places = %lf\n",2.307,
  20027.                                   2,round(2.307,2));
  20028.   
  20029.   Program output      Round 2.307 to 2 places = 2.31
  20030.   
  20031.   Example             see demonum.c
  20032.   
  20033.   
  20034.  
  20035.  
  20036.  
  20037.  
  20038.  
  20039.  
  20040.  
  20041.  
  20042.  
  20043.  
  20044.  
  20045.  
  20046.  
  20047.  
  20048.  
  20049.  
  20050.  
  20051.  
  20052.  
  20053.  
  20054.  
  20055.  
  20056.  
  20057.  
  20058.  
  20059.  
  20060.  
  20061.  
  20062.  
  20063.  
  20064.  
  20065.  
  20066.  
  20067.  
  20068.  
  20069.  
  20070.      TCHK 2.1                                                    Page 305
  20071.  
  20072.   
  20073.   Function             rsign - determine the sign of a REAL number
  20074.   
  20075.   Syntax              int rsign(struct REAL rx);
  20076.   
  20077.   Prototype in        real.h
  20078.   
  20079.   Remarks             rsign will determine the sign of rx. Zero is
  20080.                       considered positive.
  20081.   
  20082.                       Refer to the section SIMULATED FP MATH for further
  20083.                       details.
  20084.   
  20085.   Return value        returns -1 if rx is negative, otherwise 1.
  20086.   
  20087.   See also            _r_minpre, _rmatherr
  20088.                       radd(), rceil(), rdiv(), rfloor(), rnegate(),
  20089.                       rnormalize(), rsub()
  20090.   
  20091.   
  20092.  
  20093.  
  20094.  
  20095.  
  20096.  
  20097.  
  20098.  
  20099.  
  20100.  
  20101.  
  20102.  
  20103.  
  20104.  
  20105.  
  20106.  
  20107.  
  20108.  
  20109.  
  20110.  
  20111.  
  20112.  
  20113.  
  20114.  
  20115.  
  20116.  
  20117.  
  20118.  
  20119.  
  20120.  
  20121.  
  20122.  
  20123.  
  20124.  
  20125.  
  20126.  
  20127.  
  20128.  
  20129.  
  20130.  
  20131.  
  20132.  
  20133.  
  20134.  
  20135.  
  20136.      TCHK 2.1                                                    Page 306
  20137.  
  20138.   
  20139.   Function             rsub - subtract two REAL numbers
  20140.   
  20141.   Syntax              struct REAL rsub(struct REAL val, struct REAL sval,
  20142.                                        int precision);
  20143.   
  20144.   Prototype in        real.h
  20145.   
  20146.   Remarks             sval is subtracted from val. The result will have
  20147.                       precision decimal places. See rsub() for more
  20148.                       details.
  20149.   
  20150.   Return value        returns sval minus val to the specified precision.
  20151.                       If an error occurred, the returned structure's
  20152.                       values will all be -1 (rint, rfrac and precision)
  20153.                       and _rmatherr will contain the error code.
  20154.   
  20155.                       Refer to the section SIMULATED FP MATH for further
  20156.                       details.
  20157.   
  20158.   See also            _r_minpre, _rmatherr
  20159.                       radd(), rceil(), rdiv(), rfloor(), rnegate(),
  20160.                       rnormalize(), rsign()
  20161.   
  20162.   
  20163.  
  20164.  
  20165.  
  20166.  
  20167.  
  20168.  
  20169.  
  20170.  
  20171.  
  20172.  
  20173.  
  20174.  
  20175.  
  20176.  
  20177.  
  20178.  
  20179.  
  20180.  
  20181.  
  20182.  
  20183.  
  20184.  
  20185.  
  20186.  
  20187.  
  20188.  
  20189.  
  20190.  
  20191.  
  20192.  
  20193.  
  20194.  
  20195.  
  20196.  
  20197.  
  20198.  
  20199.  
  20200.  
  20201.  
  20202.      TCHK 2.1                                                    Page 307
  20203.  
  20204.   
  20205.   Function             rtrim - trims trailing blanks
  20206.   
  20207.   Syntax              char *rtrim(char *source);
  20208.   
  20209.   Prototype in        stringhk.h
  20210.   
  20211.   Remarks             removes trailing blanks in a string. The string
  20212.                       passed to rtrim (source) is modified.
  20213.   
  20214.   Return value        returns a pointer to source.
  20215.   
  20216.   Example             #include <stringhk.h>
  20217.                       #include <stdio.h>            /* for the printf */
  20218.   
  20219.                       main()
  20220.                       {
  20221.                            char msg[25] = "  Hello everyone   ";
  20222.                            printf("String [%s]\n",msg);
  20223.                            printf("rtrim  [%s]\n",rtrim(msg));
  20224.                       }
  20225.        
  20226.   Program output      String [  Hello everyone   ]
  20227.                       rtrim  [  Hello everyone]
  20228.   
  20229.   
  20230.  
  20231.  
  20232.  
  20233.  
  20234.  
  20235.  
  20236.  
  20237.  
  20238.  
  20239.  
  20240.  
  20241.  
  20242.  
  20243.  
  20244.  
  20245.  
  20246.  
  20247.  
  20248.  
  20249.  
  20250.  
  20251.  
  20252.  
  20253.  
  20254.  
  20255.  
  20256.  
  20257.  
  20258.  
  20259.  
  20260.  
  20261.  
  20262.  
  20263.  
  20264.  
  20265.  
  20266.  
  20267.  
  20268.      TCHK 2.1                                                    Page 308
  20269.  
  20270.   
  20271.   Function             scrbuff - calculate size of screen buffer
  20272.   
  20273.   Syntax              #include <video.h>
  20274.                       scrbuff(l,t,r,b)
  20275.   
  20276.   Prototype in        video.h
  20277.   
  20278.   Remarks             this is really just a define to calculate the size
  20279.                       of a buffer need by Borland's gettext() and
  20280.                       puttext() functions.
  20281.   
  20282.   Return value        returns the number of bytes needed to store a
  20283.                       segment of screen from (l,t) to (r,b), with
  20284.                       attributes.
  20285.   
  20286.   See also            video.h
  20287.   
  20288.  
  20289.  
  20290.  
  20291.  
  20292.  
  20293.  
  20294.  
  20295.  
  20296.  
  20297.  
  20298.  
  20299.  
  20300.  
  20301.  
  20302.  
  20303.  
  20304.  
  20305.  
  20306.  
  20307.  
  20308.  
  20309.  
  20310.  
  20311.  
  20312.  
  20313.  
  20314.  
  20315.  
  20316.  
  20317.  
  20318.  
  20319.  
  20320.  
  20321.  
  20322.  
  20323.  
  20324.  
  20325.  
  20326.  
  20327.  
  20328.  
  20329.  
  20330.  
  20331.  
  20332.  
  20333.  
  20334.      TCHK 2.1                                                    Page 309
  20335.  
  20336.   
  20337.   Function             scroll_down - scroll window down
  20338.   
  20339.   Syntax              void scroll_down(int left, int top, int right,
  20340.                                        int bottom);
  20341.   
  20342.   Prototype in        video.h
  20343.   
  20344.   Remarks             scroll a box, delineated by the coordinates, down 1
  20345.                       line. A blank line will be inserted at the top, and
  20346.                       the bottom line will be lost. The scrolling is done
  20347.                       via INT 0x10, Function 7. Coordinates are absolute.
  20348.   
  20349.   Return value        nothing.
  20350.   
  20351.   See also            scroll_up()
  20352.   
  20353.   Example             #include <video.h>
  20354.   
  20355.                       main()
  20356.                       {
  20357.                            scroll_down(0,0,4,79);
  20358.                            /* scroll bottom 4 lines */
  20359.                       }
  20360.   
  20361.   
  20362.  
  20363.  
  20364.  
  20365.  
  20366.  
  20367.  
  20368.  
  20369.  
  20370.  
  20371.  
  20372.  
  20373.  
  20374.  
  20375.  
  20376.  
  20377.  
  20378.  
  20379.  
  20380.  
  20381.  
  20382.  
  20383.  
  20384.  
  20385.  
  20386.  
  20387.  
  20388.  
  20389.  
  20390.  
  20391.  
  20392.  
  20393.  
  20394.  
  20395.  
  20396.  
  20397.  
  20398.  
  20399.  
  20400.      TCHK 2.1                                                    Page 310
  20401.  
  20402.   
  20403.   Function             scroll_up - scroll window up
  20404.   
  20405.   Syntax              void scroll_up(int left, int top, int right,
  20406.                                        int bottom);
  20407.   
  20408.   Prototype in        video.h
  20409.   
  20410.   Remarks             scroll a box, delineated by the coordinates, up 1
  20411.                       line. A blank line will be inserted at the bottom,
  20412.                       and the top line will be lost. The scrolling is
  20413.                       done via INT 0x10, Function 6. Coordinates are
  20414.                       absolute.
  20415.   
  20416.   Return value        nothing.
  20417.   
  20418.   See also            scroll_down()
  20419.   
  20420.   Example             #include <video.h>
  20421.   
  20422.                       main()
  20423.                       {
  20424.                            scroll_up(0,0,4,79); /* scroll top 4 lines */
  20425.                       }
  20426.   
  20427.   
  20428.  
  20429.  
  20430.  
  20431.  
  20432.  
  20433.  
  20434.  
  20435.  
  20436.  
  20437.  
  20438.  
  20439.  
  20440.  
  20441.  
  20442.  
  20443.  
  20444.  
  20445.  
  20446.  
  20447.  
  20448.  
  20449.  
  20450.  
  20451.  
  20452.  
  20453.  
  20454.  
  20455.  
  20456.  
  20457.  
  20458.  
  20459.  
  20460.  
  20461.  
  20462.  
  20463.  
  20464.  
  20465.  
  20466.      TCHK 2.1                                                    Page 311
  20467.  
  20468.   
  20469.   Function             ScrollLock - set the Scroll Lock key state
  20470.   
  20471.   Syntax              void ScrollLock(boolean on);
  20472.   
  20473.   Prototype in        ibm.h
  20474.   
  20475.   Remarks             sets the Scroll Lock key state to the state
  20476.                       selected by the on parameter.
  20477.   
  20478.   Return value        nothing.
  20479.   
  20480.   See also            CapsLock(), InsLock(), NumLock()
  20481.   
  20482.  
  20483.  
  20484.  
  20485.  
  20486.  
  20487.  
  20488.  
  20489.  
  20490.  
  20491.  
  20492.  
  20493.  
  20494.  
  20495.  
  20496.  
  20497.  
  20498.  
  20499.  
  20500.  
  20501.  
  20502.  
  20503.  
  20504.  
  20505.  
  20506.  
  20507.  
  20508.  
  20509.  
  20510.  
  20511.  
  20512.  
  20513.  
  20514.  
  20515.  
  20516.  
  20517.  
  20518.  
  20519.  
  20520.  
  20521.  
  20522.  
  20523.  
  20524.  
  20525.  
  20526.  
  20527.  
  20528.  
  20529.  
  20530.  
  20531.  
  20532.      TCHK 2.1                                                    Page 312
  20533.  
  20534.   
  20535.   Function             set_color - set the default attribute (color)
  20536.   
  20537.   Syntax              void set_color(byte colors);
  20538.   
  20539.   Prototype in        video.h
  20540.   
  20541.   Remarks             set_color just sets the global variable
  20542.                       char_attribute to colors. I got tired of declaring
  20543.                       char_attribute as extern in every function that
  20544.                       output to the screen, so I made this function.
  20545.   
  20546.   Return value        nothing.
  20547.   
  20548.   See also            putk(), putstr()
  20549.   
  20550.   Example             #include <video.h>
  20551.                       #include <color.h>
  20552.   
  20553.                       main()
  20554.                       {
  20555.                            set_color(RED | B_WHITE | BLINK);
  20556.                            /* red blinking text on white background */
  20557.                            gotoxy(12,40);
  20558.                            putstr((byte *)"Hello");
  20559.                       }
  20560.   
  20561.   
  20562.  
  20563.  
  20564.  
  20565.  
  20566.  
  20567.  
  20568.  
  20569.  
  20570.  
  20571.  
  20572.  
  20573.  
  20574.  
  20575.  
  20576.  
  20577.  
  20578.  
  20579.  
  20580.  
  20581.  
  20582.  
  20583.  
  20584.  
  20585.  
  20586.  
  20587.  
  20588.  
  20589.  
  20590.  
  20591.  
  20592.  
  20593.  
  20594.  
  20595.  
  20596.  
  20597.  
  20598.      TCHK 2.1                                                    Page 313
  20599.  
  20600.   
  20601.   Function             set_cursor - sets cursor scan lines
  20602.   
  20603.   Syntax              #include <video.h>
  20604.                       set_cursor(h,l)
  20605.   
  20606.   Prototype in        video.h
  20607.   
  20608.   Remarks             sets the cursor scan lines via setcursor(), passing
  20609.                       h | l as the cursor scan code.
  20610.   
  20611.                       This function is a macro.
  20612.   
  20613.   Return value        nothing.
  20614.   
  20615.   See also            cursor_blink(), cursor_flip(), cursor_off(),
  20616.                       cursor_on(), getcursor(), read_cursor(),
  20617.                       setcursor()
  20618.   
  20619.   Example             #include <video.h>
  20620.   
  20621.                       main()
  20622.                       {
  20623.                            set_cursor(0,7);
  20624.                       }
  20625.   
  20626.   
  20627.  
  20628.  
  20629.  
  20630.  
  20631.  
  20632.  
  20633.  
  20634.  
  20635.  
  20636.  
  20637.  
  20638.  
  20639.  
  20640.  
  20641.  
  20642.  
  20643.  
  20644.  
  20645.  
  20646.  
  20647.  
  20648.  
  20649.  
  20650.  
  20651.  
  20652.  
  20653.  
  20654.  
  20655.  
  20656.  
  20657.  
  20658.  
  20659.  
  20660.  
  20661.  
  20662.  
  20663.  
  20664.      TCHK 2.1                                                    Page 314
  20665.  
  20666.   
  20667.   Function             set_handles - set handle count
  20668.   
  20669.   Syntax              int set_handles(int handles);
  20670.   
  20671.   Prototype in        filehk.h
  20672.   
  20673.   Remarks             sets the handle count via DOS Function 0x67. If
  20674.                       more than 255 handles are specified (the maximum
  20675.                       allowable) set_handle tries to set the handle count
  20676.                       to 255.
  20677.   
  20678.   Return value        returns zero if execution was successful, a nonzero
  20679.                       error code otherwise.
  20680.   
  20681.   Note                This function requires DOS 3.3+.
  20682.   
  20683.   Example             #include <filehk.h>
  20684.   
  20685.                       main()
  20686.                       {
  20687.                            set_handles(127);
  20688.                       }
  20689.   
  20690.  
  20691.  
  20692.  
  20693.  
  20694.  
  20695.  
  20696.  
  20697.  
  20698.  
  20699.  
  20700.  
  20701.  
  20702.  
  20703.  
  20704.  
  20705.  
  20706.  
  20707.  
  20708.  
  20709.  
  20710.  
  20711.  
  20712.  
  20713.  
  20714.  
  20715.  
  20716.  
  20717.  
  20718.  
  20719.  
  20720.  
  20721.  
  20722.  
  20723.  
  20724.  
  20725.  
  20726.  
  20727.  
  20728.  
  20729.  
  20730.      TCHK 2.1                                                    Page 315
  20731.  
  20732.   
  20733.   Function             set_mode - set the video mode
  20734.   
  20735.   Syntax              void set_mode(byte mode);
  20736.   
  20737.   Prototype in        video.h
  20738.   
  20739.   Remarks             sets the video mode via INT 0x10, Service 0.
  20740.   
  20741.   Return value        nothing.
  20742.   
  20743.   See also            video.h
  20744.                       read_mode()
  20745.   
  20746.   Example             #include <video.h>
  20747.   
  20748.                       main()
  20749.                       {
  20750.                            set_mode(3);        /* text mode */
  20751.                            printf("# columns: %d    Mode: %d   Page:
  20752.                                 %d\n", width, mode, page);
  20753.                       }
  20754.   
  20755.   Program output      # columns: 80    Mode: 3   Page: 1
  20756.   
  20757.   
  20758.  
  20759.  
  20760.  
  20761.  
  20762.  
  20763.  
  20764.  
  20765.  
  20766.  
  20767.  
  20768.  
  20769.  
  20770.  
  20771.  
  20772.  
  20773.  
  20774.  
  20775.  
  20776.  
  20777.  
  20778.  
  20779.  
  20780.  
  20781.  
  20782.  
  20783.  
  20784.  
  20785.  
  20786.  
  20787.  
  20788.  
  20789.  
  20790.  
  20791.  
  20792.  
  20793.  
  20794.  
  20795.  
  20796.      TCHK 2.1                                                    Page 316
  20797.  
  20798.   
  20799.   Function             setAutoPark - set parking delay for AUTOPARK.COM
  20800.   
  20801.   Syntax              void setAutoPark(unsigned long count);
  20802.   
  20803.   Prototype in        doshk.h
  20804.   
  20805.   Remarks             sets the parking delay for AUTOPARK.COM (resident
  20806.                       hard disk parker by Alan D. Jones) as follows:
  20807.   
  20808.                            count * 55ms timer ticks
  20809.   
  20810.   Return value        nothing.
  20811.   
  20812.   See also            isAutoPark()
  20813.   
  20814.   Example             #include <doshk.h>
  20815.   
  20816.                       main()
  20817.                       {
  20818.                            if (isAutoPark())
  20819.                                 setAutoPark(1000lu);
  20820.                            /* set delay to 55s (1000 * 0.055s = 55s) */
  20821.                       }
  20822.   
  20823.  
  20824.  
  20825.  
  20826.  
  20827.  
  20828.  
  20829.  
  20830.  
  20831.  
  20832.  
  20833.  
  20834.  
  20835.  
  20836.  
  20837.  
  20838.  
  20839.  
  20840.  
  20841.  
  20842.  
  20843.  
  20844.  
  20845.  
  20846.  
  20847.  
  20848.  
  20849.  
  20850.  
  20851.  
  20852.  
  20853.  
  20854.  
  20855.  
  20856.  
  20857.  
  20858.  
  20859.  
  20860.  
  20861.  
  20862.      TCHK 2.1                                                    Page 317
  20863.  
  20864.   
  20865.   Function             setBREAK - set Ctrl-BREAK flag
  20866.   
  20867.   Syntax              #include <ibm.h>
  20868.                       boolean setBREAK(boolean break_status);
  20869.   
  20870.   Prototype in        ibm.h
  20871.   
  20872.   Remarks             sets the state of the Ctrl-BREAK flag. The BREAK
  20873.                       status flag can be set from DOS by BREAK ON or
  20874.                       BREAK OFF.
  20875.   
  20876.                       This function is a macro.
  20877.   
  20878.   Return value        returns TRUE if the break flag is on, FALSE if the
  20879.                       flag is off.
  20880.   
  20881.   Note                the return value is based on the CURRENT setting.
  20882.                       If you set the break flag, setBREAK will return
  20883.                       what you set the flag to, not what the flag was set
  20884.                       to before.
  20885.   
  20886.   See also            isBREAKon(), isVERIFYon(), setVERIFY()
  20887.   
  20888.   Example             #include <ibm.h>
  20889.   
  20890.                       main()
  20891.                       {
  20892.                            printf("BREAK flag was ");
  20893.                            if (! setBREAK(TRUE))
  20894.                                 printf("not ");
  20895.                            printf("on\n");
  20896.                       }
  20897.   
  20898.  
  20899.  
  20900.  
  20901.  
  20902.  
  20903.  
  20904.  
  20905.  
  20906.  
  20907.  
  20908.  
  20909.  
  20910.  
  20911.  
  20912.  
  20913.  
  20914.  
  20915.  
  20916.  
  20917.  
  20918.  
  20919.  
  20920.  
  20921.  
  20922.  
  20923.  
  20924.  
  20925.  
  20926.  
  20927.  
  20928.      TCHK 2.1                                                    Page 318
  20929.  
  20930.   
  20931.   Function             setcdevicemoderaw - set character device mode
  20932.   
  20933.   Syntax              int setcdevicemoderaw(int handle, boolean setraw);
  20934.   
  20935.   Prototype in        doshhk.h
  20936.   
  20937.   Remarks             setcdevicemoderaw() sets the mode for a character
  20938.                       device associated with handle to "cooked" or "raw"
  20939.                       mode. In cooked mode, DOS performs some translation
  20940.                       of characters, while in raw mode no translation is
  20941.                       performed.
  20942.   
  20943.   Return value        setcdevicemoderaw returns the device's original
  20944.                       mode settings as follows:
  20945.   
  20946.                             1:  raw mode
  20947.                             0:  cooked mode
  20948.                            -1:  error
  20949.   
  20950.                       If there was an error, Borland's variable errno
  20951.                       will contain the error code as follows:
  20952.   
  20953.                             1   function number invalid
  20954.                             4   no handle available
  20955.                             5   access denied
  20956.                             6   handle invalid or not open
  20957.                            13   data invalid
  20958.   
  20959.   See also            iscdevicemoderaw(), isdrivelocal(),
  20960.                       ishandlelocal(), isRedirectStdin(),
  20961.                       isRedirectStdout(), isremoveable()
  20962.   
  20963.   
  20964.  
  20965.  
  20966.  
  20967.  
  20968.  
  20969.  
  20970.  
  20971.  
  20972.  
  20973.  
  20974.  
  20975.  
  20976.  
  20977.  
  20978.  
  20979.  
  20980.  
  20981.  
  20982.  
  20983.  
  20984.  
  20985.  
  20986.  
  20987.  
  20988.  
  20989.  
  20990.  
  20991.  
  20992.  
  20993.  
  20994.      TCHK 2.1                                                    Page 319
  20995.  
  20996.   
  20997.   Function             setcursor - sets cursor scan lines
  20998.   
  20999.   Syntax              void set_cursor(unsigned int cursor);
  21000.   
  21001.   Prototype in        video.h
  21002.   
  21003.   Remarks             sets the cursor scan lines via INT 0x10, Function
  21004.                       1.
  21005.   
  21006.   Return value        nothing.
  21007.   
  21008.   See also            cursor_blink(), cursor_flip(), cursor_off(),
  21009.                       cursor_on(), getcursor(), read_cursor(),
  21010.                       set_cursor()
  21011.   
  21012.   Example             #include <video.h>
  21013.   
  21014.                       main()
  21015.                       {
  21016.                            setcursor(7);
  21017.                       }
  21018.   
  21019.   
  21020.  
  21021.  
  21022.  
  21023.  
  21024.  
  21025.  
  21026.  
  21027.  
  21028.  
  21029.  
  21030.  
  21031.  
  21032.  
  21033.  
  21034.  
  21035.  
  21036.  
  21037.  
  21038.  
  21039.  
  21040.  
  21041.  
  21042.  
  21043.  
  21044.  
  21045.  
  21046.  
  21047.  
  21048.  
  21049.  
  21050.  
  21051.  
  21052.  
  21053.  
  21054.  
  21055.  
  21056.  
  21057.  
  21058.  
  21059.  
  21060.      TCHK 2.1                                                    Page 320
  21061.  
  21062.   
  21063.   Function             SetpcAnywhere - enable/disable pcAnywhere
  21064.   
  21065.   Syntax              void SetpcAnywhere(boolean enabled);
  21066.   
  21067.   Prototype in        doshk.h
  21068.   
  21069.   Remarks             SetpcAnywhere() is used to enable or disable
  21070.                       pcAnywhere, depending on the parameter passed. This
  21071.                       function assumes pcAnywhere is installed.
  21072.   
  21073.   Return value        nothing.
  21074.   
  21075.   See also            ispcAnywhere()
  21076.   
  21077.   Example             #include <doshk.h>
  21078.                       #include <howard.h>      /* for TRUE */
  21079.   
  21080.                       main()
  21081.                       {
  21082.                            printf("pcAnywhere is ");
  21083.                            if (ispcAnywhere()) {
  21084.                                 SetpcAnywhere(TRUE);
  21085.                                 printf("enabled");
  21086.                            } else
  21087.                                 printf("not installed");
  21088.                       }
  21089.   
  21090.   
  21091.  
  21092.  
  21093.  
  21094.  
  21095.  
  21096.  
  21097.  
  21098.  
  21099.  
  21100.  
  21101.  
  21102.  
  21103.  
  21104.  
  21105.  
  21106.  
  21107.  
  21108.  
  21109.  
  21110.  
  21111.  
  21112.  
  21113.  
  21114.  
  21115.  
  21116.  
  21117.  
  21118.  
  21119.  
  21120.  
  21121.  
  21122.  
  21123.  
  21124.  
  21125.  
  21126.      TCHK 2.1                                                    Page 321
  21127.  
  21128.   
  21129.   Function             SetPointDevice - Pointing Device BIOS Interface:
  21130.                                          Enable/Disable Pointing Device
  21131.   
  21132.   Syntax              int SetPointDevice(boolean enable);
  21133.   
  21134.   Prototype in        ibm.h
  21135.   
  21136.   Remarks             SetPointDevice() will enable or disable the
  21137.                       pointing device through the Pointing Device BIOS
  21138.                       Interface, depending on the value of the parameter
  21139.                       enable.
  21140.   
  21141.   Return value        returns 0 on success and -1 on failure, with the
  21142.                       error code stored in Borland's global variable
  21143.                       errno. Here are the possible error values:
  21144.   
  21145.                            0x01      Invalid function
  21146.                            0x02      Invalid input
  21147.                            0x03      Interface error
  21148.                            0x04      Need to resend
  21149.                            0x05      No device handler installed
  21150.   
  21151.   Note                This function is only available on PS/2 machines or
  21152.                       under DESQview 2.x.
  21153.   
  21154.   See also            GetTypePointDevice(), ResetPointDevice(),
  21155.                       SetRatePointDevice(), SetResPointDevice()
  21156.   
  21157.   
  21158.  
  21159.  
  21160.  
  21161.  
  21162.  
  21163.  
  21164.  
  21165.  
  21166.  
  21167.  
  21168.  
  21169.  
  21170.  
  21171.  
  21172.  
  21173.  
  21174.  
  21175.  
  21176.  
  21177.  
  21178.  
  21179.  
  21180.  
  21181.  
  21182.  
  21183.  
  21184.  
  21185.  
  21186.  
  21187.  
  21188.  
  21189.  
  21190.  
  21191.  
  21192.      TCHK 2.1                                                    Page 322
  21193.  
  21194.   
  21195.   Function             SetRatePointDevice - Pointing Device BIOS
  21196.                                              Interface: Set Sampling Rate
  21197.   
  21198.   Syntax              int SetRatePointDevice(unsigned char samplerate);
  21199.   
  21200.   Prototype in        ibm.h
  21201.   
  21202.   Remarks             SetRatePointDevice() will set the sampling rate
  21203.                       defined by samplerate. The values of samplerate
  21204.                       currently supported are:
  21205.   
  21206.                            0x00      10/second
  21207.                            0x01      20/second
  21208.                            0x02      40/second
  21209.                            0x03      60/second
  21210.                            0x04      80/second
  21211.                            0x05      100/second
  21212.                            0x06      200/second
  21213.   
  21214.   Return value        returns 0 on success and -1 on failure, with the
  21215.                       error code stored in Borland's global variable
  21216.                       errno. Here are the possible error values:
  21217.   
  21218.                            0x01      Invalid function
  21219.                            0x02      Invalid input
  21220.                            0x03      Interface error
  21221.                            0x04      Need to resend
  21222.                            0x05      No device handler installed
  21223.   
  21224.   Note                This function is only available on PS/2 machines or
  21225.                       under DESQview 2.x.
  21226.   
  21227.   See also            GetTypePointDevice(), ResetPointDevice(),
  21228.                       SetPointDevice(), SetResPointDevice()
  21229.   
  21230.   
  21231.  
  21232.  
  21233.  
  21234.  
  21235.  
  21236.  
  21237.  
  21238.  
  21239.  
  21240.  
  21241.  
  21242.  
  21243.  
  21244.  
  21245.  
  21246.  
  21247.  
  21248.  
  21249.  
  21250.  
  21251.  
  21252.  
  21253.  
  21254.  
  21255.  
  21256.  
  21257.  
  21258.      TCHK 2.1                                                    Page 323
  21259.  
  21260.   
  21261.   Function             SetResPointDevice - Pointing Device BIOS
  21262.                                             Interface: Set Resolution
  21263.   
  21264.   Syntax              int SetResPointDevice(unsigned char countpermm);
  21265.   
  21266.   Prototype in        ibm.h
  21267.   
  21268.   Remarks             SetResPointDevice() will set the resolution based
  21269.                       on the value of countpermm. The values of
  21270.                       countpermm currently supported are:
  21271.   
  21272.                            0x00      1 count per mm
  21273.                            0x01      2 counts per mm
  21274.                            0x02      4 counts per mm
  21275.                            0x03      8 counts per mm
  21276.   
  21277.   Return value        returns 0 on success and -1 on failure, with the
  21278.                       error code stored in Borland's global variable
  21279.                       errno. Here are the possible error values:
  21280.   
  21281.                            0x01      Invalid function
  21282.                            0x02      Invalid input
  21283.                            0x03      Interface error
  21284.                            0x04      Need to resend
  21285.                            0x05      No device handler installed
  21286.   
  21287.   Note                This function is only available on PS/2 machines or
  21288.                       under DESQview 2.x.
  21289.   
  21290.   See also            GetTypePointDevice(), ResetPointDevice(),
  21291.                       SetPointDevice(), SetRatePointDevice()
  21292.   
  21293.   
  21294.  
  21295.  
  21296.  
  21297.  
  21298.  
  21299.  
  21300.  
  21301.  
  21302.  
  21303.  
  21304.  
  21305.  
  21306.  
  21307.  
  21308.  
  21309.  
  21310.  
  21311.  
  21312.  
  21313.  
  21314.  
  21315.  
  21316.  
  21317.  
  21318.  
  21319.  
  21320.  
  21321.  
  21322.  
  21323.  
  21324.      TCHK 2.1                                                    Page 324
  21325.  
  21326.   
  21327.   Function             settextinfo - set text mode video information
  21328.   
  21329.   Syntax              void settextinfo(struct text_info *inforec);
  21330.   
  21331.   Prototype in        video.h
  21332.   
  21333.   Remarks             settextinfo sets the Borland internal text mode
  21334.                       settings to the values in the text_info structure
  21335.                       pointed to by inforec, in the following order:
  21336.   
  21337.                            mode                (via textmode())
  21338.                            window              (via window())
  21339.                            attribute           (via textattr())
  21340.                            cursor location     (via gotoxy())
  21341.   
  21342.                       Only those settings needed to be modified are
  21343.                       actually changed.
  21344.   
  21345.                       This function does the exact opposite of
  21346.                       gettextinfo(), and was designed to be used in
  21347.                       conjunction with it. Do a gettextinfo() to save the
  21348.                       current settings, do whatever, then restore the
  21349.                       settings via settextinfo().
  21350.   
  21351.   Return value        nothing.
  21352.   
  21353.   
  21354.  
  21355.  
  21356.  
  21357.  
  21358.  
  21359.  
  21360.  
  21361.  
  21362.  
  21363.  
  21364.  
  21365.  
  21366.  
  21367.  
  21368.  
  21369.  
  21370.  
  21371.  
  21372.  
  21373.  
  21374.  
  21375.  
  21376.  
  21377.  
  21378.  
  21379.  
  21380.  
  21381.  
  21382.  
  21383.  
  21384.  
  21385.  
  21386.  
  21387.  
  21388.  
  21389.  
  21390.      TCHK 2.1                                                    Page 325
  21391.  
  21392.   
  21393.   Function             setVERIFY - set VERIFY flag
  21394.   
  21395.   Syntax              #include <ibm.h>
  21396.                       boolean setVERIFY(boolean verify_status);
  21397.   
  21398.   Prototype in        ibm.h
  21399.   
  21400.   Remarks             sets the state of the verify flag. The VERIFY
  21401.                       status flag can be set from DOS by VERIFY ON or
  21402.                       VERIFY OFF.
  21403.   
  21404.                       This function is a macro.
  21405.   
  21406.   Return value        returns TRUE if the verify flag is on, FALSE if the
  21407.                       flag is off.
  21408.   
  21409.   Note                the return value is based on the CURRENT setting.
  21410.                       If you set the verify flag, setVERIFY will return
  21411.                       what you set the flag to, not what the flag was set
  21412.                       to before.
  21413.   
  21414.   See also            isBREAKon(), isVERIFYon(), setBREAK()
  21415.   
  21416.   Example             #include <ibm.h>
  21417.   
  21418.                       main()
  21419.                       {
  21420.                            printf("VERIFY flag was ");
  21421.                            if (! setVERIFY(TRUE))
  21422.                                 printf("not ");
  21423.                            printf("on\n");
  21424.                       }
  21425.   
  21426.  
  21427.  
  21428.  
  21429.  
  21430.  
  21431.  
  21432.  
  21433.  
  21434.  
  21435.  
  21436.  
  21437.  
  21438.  
  21439.  
  21440.  
  21441.  
  21442.  
  21443.  
  21444.  
  21445.  
  21446.  
  21447.  
  21448.  
  21449.  
  21450.  
  21451.  
  21452.  
  21453.  
  21454.  
  21455.  
  21456.      TCHK 2.1                                                    Page 326
  21457.  
  21458.   
  21459.   Function             setWhoa - set delay count for WHOA!.COM by Brad
  21460.                                   Crandall
  21461.   
  21462.   Syntax              boolean setWhoa(unsigned int delaycount);
  21463.   
  21464.   Prototype in        doshk.h
  21465.   
  21466.   Remarks             sets the delay count for WHOA!.COM (system
  21467.                       slow-down utility by Brad Crandall). The systems
  21468.                       slows more as values for delaycount get larger.
  21469.   
  21470.   Return value        returns TRUE if WHOA!.COM is successfully slowed,
  21471.                       FALSE otherwise.
  21472.   
  21473.   See also            isWhoa(), uninstallWhoa()
  21474.   
  21475.   Example             #include <doshk.h>
  21476.   
  21477.                       main()
  21478.                       {
  21479.                            if (isWhoa()) {
  21480.                                 printf("Whoa! is ");
  21481.                                 if (! setWhoa(100u))
  21482.                                      printf("not ");
  21483.                                 printf("successfully slowed\n");
  21484.                            } else
  21485.                                 printf("Whoa! is not installed");
  21486.                       }
  21487.   
  21488.  
  21489.  
  21490.  
  21491.  
  21492.  
  21493.  
  21494.  
  21495.  
  21496.  
  21497.  
  21498.  
  21499.  
  21500.  
  21501.  
  21502.  
  21503.  
  21504.  
  21505.  
  21506.  
  21507.  
  21508.  
  21509.  
  21510.  
  21511.  
  21512.  
  21513.  
  21514.  
  21515.  
  21516.  
  21517.  
  21518.  
  21519.  
  21520.  
  21521.  
  21522.      TCHK 2.1                                                    Page 327
  21523.  
  21524.   
  21525.   Function             shadow - draw a shadowed box
  21526.   
  21527.   Syntax              void shadow(int left, int top, int right,
  21528.                                   int bottom, char frame[]);
  21529.   
  21530.   Prototype in        video.h
  21531.   
  21532.   Remarks             draws a shadowed box at the coordinates (left,top)
  21533.                       to (right,bottom). The coordinates will contain the
  21534.                       box and any shadowing necessary. In the example
  21535.                       below, the smallest value for bottom should be 3,
  21536.                       which would draw:
  21537.   
  21538.                            abbbbbbc
  21539.                            gffffffe+
  21540.                             ++++++++
  21541.   
  21542.   
  21543.                       The characters in frame[] are used to generate the
  21544.                       frame. Also, frame must be have at least 9 elements
  21545.                       (char frame[9]). The box characters are frame[0]
  21546.                       (top left) to frame[7] (left wall), going
  21547.                       clockwise. If frame[8] != '\0' the box is filled
  21548.                       with it.
  21549.   
  21550.                       Video output is via Borland's console i/o. All
  21551.                       coordinates are based on the actual screen (1,1 to
  21552.                       width,height) and not the current window() setting.
  21553.   
  21554.                       All shadowing uses _shadowchar and _shadowcolor to
  21555.                       determine the character and color used.
  21556.   
  21557.                       This function does virtually no error checking.
  21558.   
  21559.   Return value        nothing.
  21560.   
  21561.   See also            video.h
  21562.                       _shadowstyle, _shadowchar, _shadowcolor
  21563.                       box(), boxwindow()
  21564.   
  21565.   Example             #include <video.h>
  21566.   
  21567.                       main()
  21568.                       {
  21569.                            extern int _shadowstyle;
  21570.                            extern char _shadowchar;
  21571.                            char framebox[] = "abcdefgh";
  21572.   
  21573.                            _shadowstyle = SHADOW_R|SHADOW_BR|SHADOW_B;
  21574.                            _shadowchar = '+';
  21575.                            shadow(1,1,9,5,framebox);
  21576.                       }
  21577.   
  21578.   
  21579.  
  21580.  
  21581.  
  21582.  
  21583.  
  21584.  
  21585.  
  21586.  
  21587.  
  21588.      TCHK 2.1                                                    Page 328
  21589.  
  21590.   Program output      abbbbbbc
  21591.                       h      d+
  21592.                       h      d+
  21593.                       gffffffe+
  21594.                        ++++++++
  21595.   
  21596.   
  21597.  
  21598.  
  21599.  
  21600.  
  21601.  
  21602.  
  21603.  
  21604.  
  21605.  
  21606.  
  21607.  
  21608.  
  21609.  
  21610.  
  21611.  
  21612.  
  21613.  
  21614.  
  21615.  
  21616.  
  21617.  
  21618.  
  21619.  
  21620.  
  21621.  
  21622.  
  21623.  
  21624.  
  21625.  
  21626.  
  21627.  
  21628.  
  21629.  
  21630.  
  21631.  
  21632.  
  21633.  
  21634.  
  21635.  
  21636.  
  21637.  
  21638.  
  21639.  
  21640.  
  21641.  
  21642.  
  21643.  
  21644.  
  21645.  
  21646.  
  21647.  
  21648.  
  21649.  
  21650.  
  21651.  
  21652.  
  21653.  
  21654.      TCHK 2.1                                                    Page 329
  21655.  
  21656.   
  21657.   Function             shorttoddate - convert a short date to struct
  21658.   
  21659.   Syntax              struct ddate *shorttoddate(char *source);
  21660.   
  21661.   Prototype in        datehk.h
  21662.   
  21663.   Remarks             shorttoddate converts a date from a short date
  21664.                       format to the structure ddate format
  21665.   
  21666.   Return value        returns a pointer to the storage location
  21667.                       containing the date structure, or NULL if space
  21668.                       could not be allocated.
  21669.   
  21670.   See also            see Appendix A
  21671.                       Cal...(), date_convert(), ddatetofull(),
  21672.                       ddatetoshort(), ddatetostr(), fulltoddate(),
  21673.                       Greg...(), Jul...(), monthexpand(), strtoddate()
  21674.   
  21675.   Example             see demodate.c
  21676.   
  21677.  
  21678.  
  21679.  
  21680.  
  21681.  
  21682.  
  21683.  
  21684.  
  21685.  
  21686.  
  21687.  
  21688.  
  21689.  
  21690.  
  21691.  
  21692.  
  21693.  
  21694.  
  21695.  
  21696.  
  21697.  
  21698.  
  21699.  
  21700.  
  21701.  
  21702.  
  21703.  
  21704.  
  21705.  
  21706.  
  21707.  
  21708.  
  21709.  
  21710.  
  21711.  
  21712.  
  21713.  
  21714.  
  21715.  
  21716.  
  21717.  
  21718.  
  21719.  
  21720.      TCHK 2.1                                                    Page 330
  21721.  
  21722.   
  21723.   Function             soundex - convert a string to soundex form
  21724.   
  21725.   Syntax              char *soundex(char *str, char *soundexstr);
  21726.   
  21727.   Prototype in        stringhk.h
  21728.   
  21729.   Remarks             soundex() will convert a character string to
  21730.                       soundex form (phonetic complement). The soundex
  21731.                       form will always a be null terminated string 5
  21732.                       characters long. The first character of the soundex
  21733.                       form will always be the first character in str
  21734.                       (capitalized). The remaining 4 characters will be
  21735.                       '0' to '5', using the following conventions:
  21736.   
  21737.                            all non-alphabetic characters are ignored
  21738.   
  21739.                            soundex() is case independent
  21740.   
  21741.                            alphabetic characters are converted to a digit
  21742.                            using the following table:
  21743.   
  21744.                                 1 = BFPV
  21745.                                 2 = CGJKQRSXZ
  21746.                                 3 = DT
  21747.                                 4 = L
  21748.                                 5 = MN
  21749.                                 all others are ignored
  21750.   
  21751.                            run lengths of characters are ignored (i.e.
  21752.                            the 2nd 'r' in mirror)
  21753.   
  21754.                       Processing ends when either str is fully processed,
  21755.                       or the soundex string is 5 characters long (not
  21756.                       including the null terminator). If str is fully
  21757.                       processed, the soundex string will be padded with
  21758.                       '0' to give it a length of 5.
  21759.   
  21760.                       This function is based on the soundex algorithm
  21761.                       published by Nicklaus Wirth.
  21762.   
  21763.   Return value        returns soundexstr.
  21764.   
  21765.   Example             #include <stringhk.h>
  21766.   
  21767.                       main()
  21768.                       {
  21769.                            char *str[] = {"Billy","bill",
  21770.                                           "mirror","marred",
  21771.                                           "Borland International" };
  21772.                            char temp[30];
  21773.                            int i;
  21774.   
  21775.   
  21776.  
  21777.  
  21778.  
  21779.  
  21780.  
  21781.  
  21782.  
  21783.  
  21784.  
  21785.  
  21786.      TCHK 2.1                                                    Page 331
  21787.  
  21788.                            for (i=0; i<5; i++)
  21789.                                 printf("%s = %s",str[i],
  21790.                                        soundex(str,temp);
  21791.                       }
  21792.   
  21793.   Program output      Billy = B4000
  21794.                       bill = B4000
  21795.                       mirror = M2200
  21796.                       marred = M2300
  21797.                       Borland International = B2453
  21798.   
  21799.   
  21800.  
  21801.  
  21802.  
  21803.  
  21804.  
  21805.  
  21806.  
  21807.  
  21808.  
  21809.  
  21810.  
  21811.  
  21812.  
  21813.  
  21814.  
  21815.  
  21816.  
  21817.  
  21818.  
  21819.  
  21820.  
  21821.  
  21822.  
  21823.  
  21824.  
  21825.  
  21826.  
  21827.  
  21828.  
  21829.  
  21830.  
  21831.  
  21832.  
  21833.  
  21834.  
  21835.  
  21836.  
  21837.  
  21838.  
  21839.  
  21840.  
  21841.  
  21842.  
  21843.  
  21844.  
  21845.  
  21846.  
  21847.  
  21848.  
  21849.  
  21850.  
  21851.  
  21852.      TCHK 2.1                                                    Page 332
  21853.  
  21854.   
  21855.   Function             sqr - square of a value
  21856.   
  21857.   Syntax              #include <mathhk.h>
  21858.                       (type) sqr(x)
  21859.   
  21860.   Prototype in        mathhk.h
  21861.   
  21862.   Remarks             sqr will calculate the square of x.
  21863.   
  21864.                       This function is a macro.
  21865.   
  21866.   Return value        returns the square of x.
  21867.   
  21868.   
  21869.  
  21870.  
  21871.  
  21872.  
  21873.  
  21874.  
  21875.  
  21876.  
  21877.  
  21878.  
  21879.  
  21880.  
  21881.  
  21882.  
  21883.  
  21884.  
  21885.  
  21886.  
  21887.  
  21888.  
  21889.  
  21890.  
  21891.  
  21892.  
  21893.  
  21894.  
  21895.  
  21896.  
  21897.  
  21898.  
  21899.  
  21900.  
  21901.  
  21902.  
  21903.  
  21904.  
  21905.  
  21906.  
  21907.  
  21908.  
  21909.  
  21910.  
  21911.  
  21912.  
  21913.  
  21914.  
  21915.  
  21916.  
  21917.  
  21918.      TCHK 2.1                                                    Page 333
  21919.  
  21920.   
  21921.   Function             stateindex - get index for a given state
  21922.   
  21923.   Syntax              int stateindex(char *state);
  21924.   
  21925.   Prototype in        statehk.h
  21926.   
  21927.   Remarks             stateindex() looks up the state abbreviation given
  21928.                       in States[] and returns the index (array
  21929.                       subscript). The compare is case independent
  21930.   
  21931.   Return value        returns the index (array subscript) for the given
  21932.                       state, if found. If not found, returns -1.
  21933.   
  21934.   Note                see isstate() for the list of valid states
  21935.   
  21936.   See also            statehk.h
  21937.                       isstate(), iszip()
  21938.   
  21939.   Example             #include <statehk.h>
  21940.   
  21941.                       {
  21942.                            printf("AL is subscript %d\n",
  21943.                                   stateindex("AL"));
  21944.                       }
  21945.   
  21946.   Program output      AL is subscript 0
  21947.   
  21948.   
  21949.  
  21950.  
  21951.  
  21952.  
  21953.  
  21954.  
  21955.  
  21956.  
  21957.  
  21958.  
  21959.  
  21960.  
  21961.  
  21962.  
  21963.  
  21964.  
  21965.  
  21966.  
  21967.  
  21968.  
  21969.  
  21970.  
  21971.  
  21972.  
  21973.  
  21974.  
  21975.  
  21976.  
  21977.  
  21978.  
  21979.  
  21980.  
  21981.  
  21982.  
  21983.  
  21984.      TCHK 2.1                                                    Page 334
  21985.  
  21986.   
  21987.   Function             stddev - calculate the standard deviation of a
  21988.                                  set of reals
  21989.   
  21990.   Syntax              double stddev(int n, double element[]);
  21991.   
  21992.   Prototype in        mathhk.h
  21993.   
  21994.   Remarks             variance calculates the standard deviation of a set
  21995.                       of n numbers of type double.
  21996.   
  21997.   Return value        returns the standard deviation of a set of n
  21998.                       numbers.
  21999.   
  22000.   See also            average(), summation(), variance()
  22001.   
  22002.   Example             #include <mathhk.h>
  22003.   
  22004.                       main()
  22005.                       {
  22006.                            double num[] = { 2.3, 7.1, 6.05 };
  22007.   
  22008.                            printf("Std dev is %.9lf\n",stddev(3,num));
  22009.                       }
  22010.   
  22011.   Program output      Std dev is 2.060339778
  22012.   
  22013.   
  22014.  
  22015.  
  22016.  
  22017.  
  22018.  
  22019.  
  22020.  
  22021.  
  22022.  
  22023.  
  22024.  
  22025.  
  22026.  
  22027.  
  22028.  
  22029.  
  22030.  
  22031.  
  22032.  
  22033.  
  22034.  
  22035.  
  22036.  
  22037.  
  22038.  
  22039.  
  22040.  
  22041.  
  22042.  
  22043.  
  22044.  
  22045.  
  22046.  
  22047.  
  22048.  
  22049.  
  22050.      TCHK 2.1                                                    Page 335
  22051.  
  22052.   
  22053.   Function             straight_line_dep - calculate straight line
  22054.                                             depreciation
  22055.   
  22056.   Syntax              double straight_line_dep(double cost, double 
  22057.                                                salvage, int life);
  22058.   
  22059.   Prototype in        finance.h
  22060.   
  22061.   Remarks             given the cost, salvage value and life of an item,
  22062.                       straight_line_dep will calculate the periodic
  22063.                       deprecitation according to the straight line method
  22064.                       of depreciation. The cost and salvage can be given
  22065.                       in any unit (dollars, thousands of dollars, etc.)
  22066.                       but the life should be given in depreciable periods
  22067.                       (if you depreciate an item every quarter, and the
  22068.                       item has a life of 2 years, then life should be 8.)
  22069.   
  22070.                       The cost and salvage values should be in the same
  22071.                       units.
  22072.   
  22073.                       No error checking is performed.
  22074.   
  22075.   Return value        returns the periodic depreciation in the same units
  22076.                       as the cost, as per the straight line depreciation
  22077.                       method.
  22078.   
  22079.   Note                The macro SLD(c,s,l) is defined in finance.h for
  22080.                       ease of use.
  22081.   
  22082.   See also            accum_dep(), depreciation(),
  22083.                       double_decline_bal_dep(), sum_year_digits_dep()
  22084.   
  22085.   Example             see demonum.c
  22086.   
  22087.   
  22088.  
  22089.  
  22090.  
  22091.  
  22092.  
  22093.  
  22094.  
  22095.  
  22096.  
  22097.  
  22098.  
  22099.  
  22100.  
  22101.  
  22102.  
  22103.  
  22104.  
  22105.  
  22106.  
  22107.  
  22108.  
  22109.  
  22110.  
  22111.  
  22112.  
  22113.  
  22114.  
  22115.  
  22116.      TCHK 2.1                                                    Page 336
  22117.  
  22118.   
  22119.   Function             strcapital - capitalizes the first letter of each
  22120.                                      word in a string
  22121.   
  22122.   Syntax              char *strcapital(char *str);
  22123.   
  22124.   Prototype in        stringhk.h
  22125.   
  22126.   Remarks             strcapital capitalizes the first letter of each
  22127.                       word in the string str. A word is defined an an
  22128.                       alphabetic sequence of letters. The string passed
  22129.                       to strcapital is modified.
  22130.   
  22131.   Return value        returns str.
  22132.   
  22133.   
  22134.  
  22135.  
  22136.  
  22137.  
  22138.  
  22139.  
  22140.  
  22141.  
  22142.  
  22143.  
  22144.  
  22145.  
  22146.  
  22147.  
  22148.  
  22149.  
  22150.  
  22151.  
  22152.  
  22153.  
  22154.  
  22155.  
  22156.  
  22157.  
  22158.  
  22159.  
  22160.  
  22161.  
  22162.  
  22163.  
  22164.  
  22165.  
  22166.  
  22167.  
  22168.  
  22169.  
  22170.  
  22171.  
  22172.  
  22173.  
  22174.  
  22175.  
  22176.  
  22177.  
  22178.  
  22179.  
  22180.  
  22181.  
  22182.      TCHK 2.1                                                    Page 337
  22183.  
  22184.   
  22185.   Function             strclean - remove non-printable ASCII codes
  22186.   
  22187.   Syntax              char *strclean(char *str);
  22188.   
  22189.   Prototype in        stringhk.h
  22190.   
  22191.   Remarks             strclean removes any non-printable ASCII characters
  22192.                       from the string str. Non-printable is defined as
  22193.                       per the isprint() function. The string passed to
  22194.                       strclean is modified.
  22195.   
  22196.   Return value        returns str.
  22197.   
  22198.   
  22199.  
  22200.  
  22201.  
  22202.  
  22203.  
  22204.  
  22205.  
  22206.  
  22207.  
  22208.  
  22209.  
  22210.  
  22211.  
  22212.  
  22213.  
  22214.  
  22215.  
  22216.  
  22217.  
  22218.  
  22219.  
  22220.  
  22221.  
  22222.  
  22223.  
  22224.  
  22225.  
  22226.  
  22227.  
  22228.  
  22229.  
  22230.  
  22231.  
  22232.  
  22233.  
  22234.  
  22235.  
  22236.  
  22237.  
  22238.  
  22239.  
  22240.  
  22241.  
  22242.  
  22243.  
  22244.  
  22245.  
  22246.  
  22247.  
  22248.      TCHK 2.1                                                    Page 338
  22249.  
  22250.   
  22251.   Function             strcomma - convert a string to xx,xxx,xxx format
  22252.   
  22253.   Syntax              char *strcomma(char *source); 
  22254.   
  22255.   Prototype in        stringhk.h
  22256.   
  22257.   Remarks             strcomma converts a string of numbers into the
  22258.                       comma delimited format (xx,xxx,xxx). The number is
  22259.                       terminated by a non-digit (any character other than
  22260.                       0-9.) A leading sign will be copied before
  22261.                       converting the number.
  22262.   
  22263.   Return value        returns a pointer to the storage location
  22264.                       containing the comma formatted string, or NULL if
  22265.                       space could not be allocated. The returned string
  22266.                       is NOT the same as the string passed to the
  22267.                       function. This function does NOT write over the
  22268.                       string passed to it.
  22269.   
  22270.   See also            strtocomma()
  22271.   
  22272.   Example             #include <stringhk.h>
  22273.                       #include <stdio.h>            /* for the printf */
  22274.   
  22275.                       main()
  22276.                       {
  22277.                            char sint[15], *comma;
  22278.   
  22279.                            strcpy(sint,"12839.44");
  22280.                            comma = strcomma(sint);
  22281.                            printf("%s -> %s\n",sint,comma);
  22282.                       }
  22283.        
  22284.   Program output      12839.44 -> 12,839.44
  22285.   
  22286.   
  22287.  
  22288.  
  22289.  
  22290.  
  22291.  
  22292.  
  22293.  
  22294.  
  22295.  
  22296.  
  22297.  
  22298.  
  22299.  
  22300.  
  22301.  
  22302.  
  22303.  
  22304.  
  22305.  
  22306.  
  22307.  
  22308.  
  22309.  
  22310.  
  22311.  
  22312.  
  22313.  
  22314.      TCHK 2.1                                                    Page 339
  22315.  
  22316.   
  22317.   Function             strdel - delete part of a string
  22318.   
  22319.   Syntax              char *strdel(char *source, char *old);
  22320.   
  22321.   Prototype in        stringhk.h
  22322.   
  22323.   Remarks             strdel deletes the first occurence of the string
  22324.                       old from the string source. This function is case
  22325.                       dependent.
  22326.   
  22327.   Return value        returns source
  22328.   
  22329.   See also            strins()
  22330.   
  22331.   Example             #include <stringhk.h>
  22332.                       #include <stdio.h>            /* for the printf */
  22333.   
  22334.                       main()
  22335.                       {
  22336.                            char msg[45], fragment[15], *new;
  22337.   
  22338.                            strcpy(msg,"Did you register yet? Did you?");
  22339.                            strcpy(fragment,"you");
  22340.                            printf("  [%s]\n",msg);
  22341.                            printf("- [%s]\n",fragment);
  22342.                            new = strdel(msg,fragment);
  22343.                            printf("= [%s]\n",new);
  22344.                       }
  22345.   
  22346.   Program output        [Did you register yet? Did you?]
  22347.                       - [you]
  22348.                       = [Did  register yet? Did you?]
  22349.   
  22350.   
  22351.  
  22352.  
  22353.  
  22354.  
  22355.  
  22356.  
  22357.  
  22358.  
  22359.  
  22360.  
  22361.  
  22362.  
  22363.  
  22364.  
  22365.  
  22366.  
  22367.  
  22368.  
  22369.  
  22370.  
  22371.  
  22372.  
  22373.  
  22374.  
  22375.  
  22376.  
  22377.  
  22378.  
  22379.  
  22380.      TCHK 2.1                                                    Page 340
  22381.  
  22382.   
  22383.   Function             strfill - fill a string with a character
  22384.   
  22385.   Syntax              char *strfill(char *str, char c, int count);
  22386.   
  22387.   Prototype in        stringhk.h
  22388.   
  22389.   Remarks             strfill makes a string of c characters of count
  22390.                       length.
  22391.   
  22392.                       Similar to strrep(), strfill() uses an existing
  22393.                       piece of memory pointed to by str. Functions like
  22394.                       strnset set a piece of memory with a character, but
  22395.                       do not make it a valid C string (null terminated.)
  22396.   
  22397.   Return value        returns the pointer passed to strfill.
  22398.   
  22399.   See also            strrep()
  22400.   
  22401.   
  22402.  
  22403.  
  22404.  
  22405.  
  22406.  
  22407.  
  22408.  
  22409.  
  22410.  
  22411.  
  22412.  
  22413.  
  22414.  
  22415.  
  22416.  
  22417.  
  22418.  
  22419.  
  22420.  
  22421.  
  22422.  
  22423.  
  22424.  
  22425.  
  22426.  
  22427.  
  22428.  
  22429.  
  22430.  
  22431.  
  22432.  
  22433.  
  22434.  
  22435.  
  22436.  
  22437.  
  22438.  
  22439.  
  22440.  
  22441.  
  22442.  
  22443.  
  22444.  
  22445.  
  22446.      TCHK 2.1                                                    Page 341
  22447.  
  22448.   
  22449.   Function             strins - insert one string into another
  22450.   
  22451.   Syntax              char *strins(char *source, char *new, char *ptr);
  22452.   
  22453.   Prototype in        stringhk.h
  22454.   
  22455.   Remarks             strins inserts the string new into the string
  22456.                       source at the location ptr in source. Basically,
  22457.                       strins copies source up to, but not including, ptr
  22458.                       into a new location, concatenates the new
  22459.                       (inserted) string, and then concatenates the
  22460.                       remainder of source (the string pointed to by ptr.)
  22461.   
  22462.   Return value        returns a pointer to the storage location
  22463.                       containing the newly concatenated string, or NULL
  22464.                       if space could not be allocated. The returned
  22465.                       string is NOT the same as the string passed to the
  22466.                       function. This function does NOT write over the
  22467.                       string passed to it.
  22468.   
  22469.   See also            strdel()
  22470.   
  22471.   Example             #include <stringhk.h>
  22472.                       #include <stdio.h>            /* for the printf */
  22473.   
  22474.                       main()
  22475.                       {
  22476.                            char old[25], *ptr, *new;
  22477.   
  22478.                            strcpy(old,"ABCDEFG");
  22479.                            ptr = old + 3;            /* *ptr = 'D' */
  22480.                            new = strins(old,"abc",ptr);
  22481.                            printf("%s -> %s\n",old,new);
  22482.                       }
  22483.   
  22484.   Program output      ABCDEDFG -> ABCabcDEFG
  22485.   
  22486.   
  22487.  
  22488.  
  22489.  
  22490.  
  22491.  
  22492.  
  22493.  
  22494.  
  22495.  
  22496.  
  22497.  
  22498.  
  22499.  
  22500.  
  22501.  
  22502.  
  22503.  
  22504.  
  22505.  
  22506.  
  22507.  
  22508.  
  22509.  
  22510.  
  22511.  
  22512.      TCHK 2.1                                                    Page 342
  22513.  
  22514.   
  22515.   Function             stroccur - count the occurences of a substring
  22516.                                    within a string
  22517.   
  22518.   Syntax              int stroccur(str *str, char *substr);
  22519.   
  22520.   Prototype in        stringhk.h
  22521.   
  22522.   Remarks             stroccur counts the number of times the string
  22523.                       substr appears with the string str.
  22524.   
  22525.   Return value        returns the number of times the string substr
  22526.                       appears within the string str.
  22527.   
  22528.   Example             #include <stringhk.h>
  22529.                       #include <stdio.h>            /* for the printf */
  22530.   
  22531.                       main()
  22532.                       {
  22533.                            char original[] = "This is his test";
  22534.   
  22535.                            printf("%d\n",stroccur(original,"is"));
  22536.                       }
  22537.   
  22538.   Program output      3
  22539.   
  22540.   
  22541.  
  22542.  
  22543.  
  22544.  
  22545.  
  22546.  
  22547.  
  22548.  
  22549.  
  22550.  
  22551.  
  22552.  
  22553.  
  22554.  
  22555.  
  22556.  
  22557.  
  22558.  
  22559.  
  22560.  
  22561.  
  22562.  
  22563.  
  22564.  
  22565.  
  22566.  
  22567.  
  22568.  
  22569.  
  22570.  
  22571.  
  22572.  
  22573.  
  22574.  
  22575.  
  22576.  
  22577.  
  22578.      TCHK 2.1                                                    Page 343
  22579.  
  22580.   
  22581.   Function             strpadleft - pad the left of a string
  22582.   
  22583.   Syntax              char *strpadleft(char *str, char c, int len);
  22584.   
  22585.   Prototype in        stringhk.h
  22586.   
  22587.   Remarks             str will be padded on the left with len characters
  22588.                       of c. Make sure space allocated for str is big
  22589.                       enough to hold the new padded string.
  22590.   
  22591.   Return value        returns a pointer to the storage location
  22592.                       containing the newly padded string.
  22593.   
  22594.   See also            strpadright()
  22595.   
  22596.   Example             #include <stringhk.h>
  22597.   
  22598.                       main()
  22599.                       {
  22600.                            char temp[30];
  22601.   
  22602.                            strcpy(temp,"This is a sample.");
  22603.                            printf("Before: %s\n",temp);
  22604.                            printf(" After: %s\n",strpadleft(temp,'.',3));
  22605.                       }
  22606.   
  22607.   Program output      Before: This is a sample.
  22608.                        After: ...This is a sample.
  22609.   
  22610.   
  22611.  
  22612.  
  22613.  
  22614.  
  22615.  
  22616.  
  22617.  
  22618.  
  22619.  
  22620.  
  22621.  
  22622.  
  22623.  
  22624.  
  22625.  
  22626.  
  22627.  
  22628.  
  22629.  
  22630.  
  22631.  
  22632.  
  22633.  
  22634.  
  22635.  
  22636.  
  22637.  
  22638.  
  22639.  
  22640.  
  22641.  
  22642.  
  22643.  
  22644.      TCHK 2.1                                                    Page 344
  22645.  
  22646.   
  22647.   Function             strpadright - pad the right of a string
  22648.   
  22649.   Syntax              char *strpadright(char *str, char c, int len);
  22650.   
  22651.   Prototype in        stringhk.h
  22652.   
  22653.   Remarks             str will be padded on the right with len characters
  22654.                       of c. Make sure space allocated for str is big
  22655.                       enough to hold the new padded string.
  22656.   
  22657.   Return value        returns a pointer to the storage location
  22658.                       containing the newly padded string.
  22659.   
  22660.   See also            strpadleft()
  22661.   
  22662.   Example             #include <stringhk.h>
  22663.   
  22664.                       main()
  22665.                       {
  22666.                            char temp[30];
  22667.   
  22668.                            strcpy(temp,"This is a sample.");
  22669.                            printf("Before: %s\n",temp);
  22670.                            printf(" After: %s\n",
  22671.                                   strpadright(temp,'?',3));
  22672.                       }
  22673.   
  22674.   Program output      Before: This is a sample.
  22675.                        After: This is a sample.???
  22676.   
  22677.   
  22678.  
  22679.  
  22680.  
  22681.  
  22682.  
  22683.  
  22684.  
  22685.  
  22686.  
  22687.  
  22688.  
  22689.  
  22690.  
  22691.  
  22692.  
  22693.  
  22694.  
  22695.  
  22696.  
  22697.  
  22698.  
  22699.  
  22700.  
  22701.  
  22702.  
  22703.  
  22704.  
  22705.  
  22706.  
  22707.  
  22708.  
  22709.  
  22710.      TCHK 2.1                                                    Page 345
  22711.  
  22712.   
  22713.   Function             strrep - replicate a char
  22714.   
  22715.   Syntax              char *strrep(char c, int len);
  22716.   
  22717.   Prototype in        stringhk.h
  22718.   
  22719.   Remarks             strrep creates a string len long entirely of
  22720.                       character c.
  22721.   
  22722.   Return value        returns a pointer to the storage location
  22723.                       containing the newly replicated string, or NULL if
  22724.                       space could not be allocated.
  22725.   
  22726.   See also            strfill()
  22727.   
  22728.   Example             #include <stringhk.h>
  22729.                       #include <stdio.h>            /* for the printf */
  22730.   
  22731.                       main()
  22732.                       {
  22733.                            char *rep;
  22734.   
  22735.                            printf("%s\n",rep = strrep('k',7));
  22736.                       }
  22737.   
  22738.   Program output      kkkkkkk
  22739.   
  22740.   
  22741.  
  22742.  
  22743.  
  22744.  
  22745.  
  22746.  
  22747.  
  22748.  
  22749.  
  22750.  
  22751.  
  22752.  
  22753.  
  22754.  
  22755.  
  22756.  
  22757.  
  22758.  
  22759.  
  22760.  
  22761.  
  22762.  
  22763.  
  22764.  
  22765.  
  22766.  
  22767.  
  22768.  
  22769.  
  22770.  
  22771.  
  22772.  
  22773.  
  22774.  
  22775.  
  22776.      TCHK 2.1                                                    Page 346
  22777.  
  22778.   
  22779.   Function             strshleft - shift string left
  22780.   
  22781.   Syntax              void strshleft(char *source, int count);
  22782.   
  22783.   Prototype in        stringhk.h
  22784.   
  22785.   Remarks             strshleft shifts the characters in the string
  22786.                       source left count places, padding with spaces.
  22787.   
  22788.   Return value        returns source.
  22789.   
  22790.   See also            strshright()
  22791.   
  22792.   Example             #include <stringhk.h>
  22793.                       #include <stdio.h>            /* for the printf */
  22794.   
  22795.                       main()
  22796.                       {
  22797.                            char msg[25];
  22798.   
  22799.                            strcpy(msg,"Buy a Mac II");
  22800.                            printf("%s\n",msg);
  22801.                            printf("%s\n",strshleft(msg,4));
  22802.                       }
  22803.   
  22804.   Program output      Buy a Mac II
  22805.                       a Mac II
  22806.   
  22807.   
  22808.  
  22809.  
  22810.  
  22811.  
  22812.  
  22813.  
  22814.  
  22815.  
  22816.  
  22817.  
  22818.  
  22819.  
  22820.  
  22821.  
  22822.  
  22823.  
  22824.  
  22825.  
  22826.  
  22827.  
  22828.  
  22829.  
  22830.  
  22831.  
  22832.  
  22833.  
  22834.  
  22835.  
  22836.  
  22837.  
  22838.  
  22839.  
  22840.  
  22841.  
  22842.      TCHK 2.1                                                    Page 347
  22843.  
  22844.   
  22845.   Function             strshright - shift string right
  22846.   
  22847.   Syntax              void strshright(char *source, int count);
  22848.   
  22849.   Prototype in        stringhk.h
  22850.   
  22851.   Remarks             strchright shifts the characters in the string
  22852.                       source right count places, padding with spaces.
  22853.   
  22854.   Return value        returns source.
  22855.   
  22856.   See also            strshleft()
  22857.   
  22858.   Example             #include <stringhk.h>
  22859.                       #include <stdio.h>            /* for the printf */
  22860.   
  22861.                       main()
  22862.                       {
  22863.                            char msg[25];
  22864.   
  22865.                            strcpy(msg,"Buy a Mac II");
  22866.                            printf("%s\n",msg);
  22867.                            printf("%s\n",strshright(msg,4));
  22868.                       }
  22869.   
  22870.   Program output      Buy a Mac II
  22871.                           Buy a Ma
  22872.   
  22873.   
  22874.  
  22875.  
  22876.  
  22877.  
  22878.  
  22879.  
  22880.  
  22881.  
  22882.  
  22883.  
  22884.  
  22885.  
  22886.  
  22887.  
  22888.  
  22889.  
  22890.  
  22891.  
  22892.  
  22893.  
  22894.  
  22895.  
  22896.  
  22897.  
  22898.  
  22899.  
  22900.  
  22901.  
  22902.  
  22903.  
  22904.  
  22905.  
  22906.  
  22907.  
  22908.      TCHK 2.1                                                    Page 348
  22909.  
  22910.   
  22911.   Function             strspace2tab - compress spaces to tabs
  22912.   
  22913.   Syntax              char *strspace2tab(char *source, char *dest,
  22914.                                          int tablen);
  22915.   
  22916.   Prototype in        stringhk.h
  22917.   
  22918.   Remarks             copies the string source to dest with all groups of
  22919.                       tablen spaces replaced with tabs ('\t').
  22920.   
  22921.                       The converted string will be returned in dest, so
  22922.                       you must make sure there is sufficient space
  22923.                       allocated.
  22924.   
  22925.   Return value        returns dest.
  22926.   
  22927.   See also            strtabexpand()
  22928.   
  22929.   Example             #include <stringhk.h>
  22930.   
  22931.                       main()
  22932.                       {
  22933.                            char spacestr[30] = "Spaces   are     nice.";
  22934.                            char tabstr[30];
  22935.   
  22936.                            printf("Converted string: %s\n",
  22937.                                   strspace2tab(spacestr,tabstr,3);
  22938.                       }
  22939.   
  22940.   Program output      Converted string: Spaces\tare\t  nice.
  22941.   
  22942.                       (In the output, \t represents a tab character.)
  22943.   
  22944.   
  22945.  
  22946.  
  22947.  
  22948.  
  22949.  
  22950.  
  22951.  
  22952.  
  22953.  
  22954.  
  22955.  
  22956.  
  22957.  
  22958.  
  22959.  
  22960.  
  22961.  
  22962.  
  22963.  
  22964.  
  22965.  
  22966.  
  22967.  
  22968.  
  22969.  
  22970.  
  22971.  
  22972.  
  22973.  
  22974.      TCHK 2.1                                                    Page 349
  22975.  
  22976.   
  22977.   Function             strtabexpand - expand tabs to spaces
  22978.   
  22979.   Syntax              char *strtabexpand(char *source, char *dest,
  22980.                                          int tablen);
  22981.   
  22982.   Prototype in        stringhk.h
  22983.   
  22984.   Remarks             copies the string source to dest with all tabs
  22985.                       ('\t') replaced with tablen spaces.
  22986.   
  22987.                       The converted string will be returned in dest, so
  22988.                       you must make sure there is sufficient space
  22989.                       allocated.
  22990.   
  22991.   Return value        returns dest.
  22992.   
  22993.   See also            strspace2tab()
  22994.   
  22995.   Example             #include <stringhk.h>
  22996.   
  22997.                       main()
  22998.                       {
  22999.                            char spacestr[30];
  23000.                            char tabstr[30] = "Tabs\tare\tnice.";
  23001.   
  23002.                            printf("Converted string: %s\n",
  23003.                                   strtabexpand(tabstr,spacestr,4);
  23004.                       }
  23005.   
  23006.   Program output      Converted string: Tabs    are    nice.
  23007.   
  23008.   
  23009.  
  23010.  
  23011.  
  23012.  
  23013.  
  23014.  
  23015.  
  23016.  
  23017.  
  23018.  
  23019.  
  23020.  
  23021.  
  23022.  
  23023.  
  23024.  
  23025.  
  23026.  
  23027.  
  23028.  
  23029.  
  23030.  
  23031.  
  23032.  
  23033.  
  23034.  
  23035.  
  23036.  
  23037.  
  23038.  
  23039.  
  23040.      TCHK 2.1                                                    Page 350
  23041.  
  23042.   
  23043.   Function             strtocomma - convert a string to xx,xxx format
  23044.   
  23045.   Syntax              char *strtocomma(char *source); 
  23046.   
  23047.   Prototype in        stringhk.h
  23048.   
  23049.   Remarks             strtocomma converts a string of numbers into the
  23050.                       comma delimited format (xx,xxx,xxx). The number is
  23051.                       terminated by a non-digit (any character other than
  23052.                       0-9.) A leading sign will be copied before
  23053.                       converting the number.
  23054.   
  23055.                       The comma delimited string will be returned in
  23056.                       source, so you must make sure there is sufficient
  23057.                       space allocated.
  23058.   
  23059.   Return value        returns a pointer to source. This function writes
  23060.                       over the string passed to it.
  23061.   
  23062.   See also            strcomma()
  23063.   
  23064.   Example             #include <stringhk.h>
  23065.                       #include <stdio.h>            /* for the printf */
  23066.   
  23067.                       main()
  23068.                       {
  23069.                            char temp[15];
  23070.   
  23071.                            strcpy(temp,"12839.44");
  23072.                            printf("-> %s\n",strtocomma(temp));
  23073.                       }
  23074.        
  23075.   Program output      -> 12,839.44
  23076.   
  23077.   
  23078.  
  23079.  
  23080.  
  23081.  
  23082.  
  23083.  
  23084.  
  23085.  
  23086.  
  23087.  
  23088.  
  23089.  
  23090.  
  23091.  
  23092.  
  23093.  
  23094.  
  23095.  
  23096.  
  23097.  
  23098.  
  23099.  
  23100.  
  23101.  
  23102.  
  23103.  
  23104.  
  23105.  
  23106.      TCHK 2.1                                                    Page 351
  23107.  
  23108.   
  23109.   Function             strtoddate - convert a date string to a structure
  23110.   
  23111.   Syntax              struct ddate *strtoddate(char *source); 
  23112.   
  23113.   Prototype in        datehk.h
  23114.   
  23115.   Remarks             strtoddate converts a date abbreviation to a
  23116.                       structure of type ddate. The abbreviation can use
  23117.                       dashes or slashes (- or /) to separate the fields
  23118.                       of the date. All fields MUST be of length two (i.e.
  23119.                       02/07/87 is valid, but 2/7/87 and 02/07/1987 are
  23120.                       not valid.)
  23121.   
  23122.   Return value        returns a pointer to the storage location
  23123.                       containing the date structure, or NULL if space
  23124.                       could not be allocated.
  23125.   
  23126.   See also            Cal...(), date_convert(), ddatetofull(),
  23127.                       ddatetoshort(), ddatetostr(), fulltoddate(),
  23128.                       Greg...(), Jul...(), monthexpand(), shorttoddate()
  23129.   
  23130.   Example             #include <datehk.h>
  23131.   
  23132.                       main()
  23133.                       {
  23134.                            struct ddate *today;
  23135.                            char strtoday[9];
  23136.   
  23137.                            strcpy(strtoday,"04/01/67");
  23138.                            if ((today = strtoddate(strtoday) != NULL) {
  23139.                                 printf("today is %d-%d-%d\n",
  23140.                                      today->dmon, today->dday,
  23141.                                      today->dyear);
  23142.                                 printf("or %s\n", strtoday);
  23143.                            }
  23144.                       }
  23145.   
  23146.   Program output      today is 4-1-67
  23147.                       or 04/01/67
  23148.   
  23149.   
  23150.  
  23151.  
  23152.  
  23153.  
  23154.  
  23155.  
  23156.  
  23157.  
  23158.  
  23159.  
  23160.  
  23161.  
  23162.  
  23163.  
  23164.  
  23165.  
  23166.  
  23167.  
  23168.  
  23169.  
  23170.  
  23171.  
  23172.      TCHK 2.1                                                    Page 352
  23173.  
  23174.   
  23175.   Function             strtodol - converts a string to dollar format
  23176.   
  23177.   Syntax              char *strtodol(char *source); 
  23178.   
  23179.   Prototype in        stringhk.h
  23180.   
  23181.   Remarks             strtodol converts a string pointed to by source to
  23182.                       dollar format ($-12,839.44). An optional leading
  23183.                       sign is copied. Only the first 2 decimal places are
  23184.                       copied (the string is truncated, not rounded.) 
  23185.   
  23186.   Return value        returns a pointer to the storage location
  23187.                       containing the dollar formatted string, or NULL if
  23188.                       space could not be allocated. The returned string
  23189.                       is NOT the same as the string passed to the
  23190.                       function. This function does NOT write over the
  23191.                       string passed to it.
  23192.   
  23193.   Example             #include <stringhk.h>
  23194.                       #include <stdio.h>            /* for the printf */
  23195.   
  23196.                       main()
  23197.                       {
  23198.                            char sint[15], *dollar
  23199.   
  23200.                            strcpy(sint,"12839.44");
  23201.                            dollar = strtodol(sint);
  23202.                            printf("%s -> %s\n",sint,dollar);
  23203.                            free(dollar);
  23204.                            strcpy(sint,"+62939445.1");
  23205.                            dollar = strtodol(sint);
  23206.                            printf("%s -> %s\n",sint,dollar);
  23207.                            free(dollar);
  23208.                       }
  23209.        
  23210.   Program output      12839.44 -> $12,839.44
  23211.                       +62939445.1 -> $+62,939,445.10
  23212.   
  23213.   
  23214.  
  23215.  
  23216.  
  23217.  
  23218.  
  23219.  
  23220.  
  23221.  
  23222.  
  23223.  
  23224.  
  23225.  
  23226.  
  23227.  
  23228.  
  23229.  
  23230.  
  23231.  
  23232.  
  23233.  
  23234.  
  23235.  
  23236.  
  23237.  
  23238.      TCHK 2.1                                                    Page 353
  23239.  
  23240.   
  23241.   Function             strtotime - convert a string to a time structure
  23242.   
  23243.   Syntax              struct time *strtotime(char *source);
  23244.   
  23245.   Prototype in        timehk.h
  23246.   
  23247.   Remarks             strtotime converts a string to a time structure,
  23248.                       checking for AM/PM or 24-hour format. If seconds or
  23249.                       hundredths of seconds are not in the string, their
  23250.                       values will be set to 0 in the structure.
  23251.   
  23252.   Return value        returns a pointer to the storage location
  23253.                       containing the time string, or NULL if space could
  23254.                       not be allocated.
  23255.   
  23256.   See also            timetostr()
  23257.   
  23258.   Example             #include <timehk.h>
  23259.   
  23260.                       main()
  23261.                       {
  23262.                            struct time *now;
  23263.   
  23264.                            strcpy(strnow,"5:12 PM");
  23265.                            if ((now = strtotime(strnow)) != NULL)
  23266.                                 printf("%d hours, %d min, %d.%d secs\n",
  23267.                                      now->ti_hour, now->ti_min,
  23268.                                      now->ti_sec, now->ti_hund);
  23269.                       }
  23270.   
  23271.   Program output      17 hours, 12 min, 0.0 secs
  23272.   
  23273.  
  23274.  
  23275.  
  23276.  
  23277.  
  23278.  
  23279.  
  23280.  
  23281.  
  23282.  
  23283.  
  23284.  
  23285.  
  23286.  
  23287.  
  23288.  
  23289.  
  23290.  
  23291.  
  23292.  
  23293.  
  23294.  
  23295.  
  23296.  
  23297.  
  23298.  
  23299.  
  23300.  
  23301.  
  23302.  
  23303.  
  23304.      TCHK 2.1                                                    Page 354
  23305.  
  23306.   
  23307.   Function             strwcmp - compares a wild-carded string to
  23308.                                   another string
  23309.   
  23310.   Syntax              int strwcmp(char *wstr, char *str);
  23311.   
  23312.   Prototype in        stringhk.h
  23313.   
  23314.   Remarks             strwcmp performs an unsigned comparison of wstr and
  23315.                       str, starting with the first character in each
  23316.                       string and continuing with subsequent characters
  23317.                       until the corresponding characters differ or until
  23318.                       the end of the strings is reached. Wildcards (*,?)
  23319.                       are supported, as per DOS (* wildcards 0 or more
  23320.                       characters, ? wildcards a single character).
  23321.   
  23322.   Return value        strwcmp returns an int value that is
  23323.   
  23324.                            < 0       if wstr is less than str
  23325.                            = 0       if wstr is the same as str
  23326.                            > 0       if wstr is greater than str
  23327.   
  23328.                       Furthermore, if a comparison falls through during a
  23329.                       wildcard matching, -2 or 2 is returned. If a
  23330.                       mismatch is found without using wildcards, a -1 or
  23331.                       1 is returned.
  23332.   
  23333.   See also            strwicmp()
  23334.   
  23335.  
  23336.  
  23337.  
  23338.  
  23339.  
  23340.  
  23341.  
  23342.  
  23343.  
  23344.  
  23345.  
  23346.  
  23347.  
  23348.  
  23349.  
  23350.  
  23351.  
  23352.  
  23353.  
  23354.  
  23355.  
  23356.  
  23357.  
  23358.  
  23359.  
  23360.  
  23361.  
  23362.  
  23363.  
  23364.  
  23365.  
  23366.  
  23367.  
  23368.  
  23369.  
  23370.      TCHK 2.1                                                    Page 355
  23371.  
  23372.   
  23373.   Function             strwicmp - compares a wild-carded string to
  23374.                                    another string, without case
  23375.                                    sensitivity
  23376.   
  23377.   Syntax              int strwicmp(char *wstr, char *str);
  23378.   
  23379.   Prototype in        stringhk.h
  23380.   
  23381.   Remarks             strwicmp performs an unsigned comparison of wstr
  23382.                       and str, starting with the first character in each
  23383.                       string and continuing with subsequent characters
  23384.                       until the corresponding characters differ or until
  23385.                       the end of the strings is reached. Wildcards (*,?)
  23386.                       are supported, as per DOS (* wildcards 0 or more
  23387.                       characters, ? wildcards a single character). The
  23388.                       comparison is not case sensitive.
  23389.   
  23390.   Return value        strwicmp returns a value that is
  23391.   
  23392.                            < 0       if wstr is less than str
  23393.                            = 0       if wstr is the same as str
  23394.                            > 0       if wstr is greater than str
  23395.   
  23396.                       Furthermore, if a comparison falls through during a
  23397.                       wildcard matching, -2 or 2 is returned. If a
  23398.                       mismatch is found without using wildcards, a -1 or
  23399.                       1 is returned.
  23400.   
  23401.   See also            strwcmp()
  23402.   
  23403.  
  23404.  
  23405.  
  23406.  
  23407.  
  23408.  
  23409.  
  23410.  
  23411.  
  23412.  
  23413.  
  23414.  
  23415.  
  23416.  
  23417.  
  23418.  
  23419.  
  23420.  
  23421.  
  23422.  
  23423.  
  23424.  
  23425.  
  23426.  
  23427.  
  23428.  
  23429.  
  23430.  
  23431.  
  23432.  
  23433.  
  23434.  
  23435.  
  23436.      TCHK 2.1                                                    Page 356
  23437.  
  23438.   
  23439.   Function             sum_year_digits_dep - calculate sum of the years
  23440.                                                digits depreciation
  23441.   
  23442.   Syntax              double sum_year_digits_dep(double cost, double
  23443.                                      salvage, int life, int period);
  23444.   
  23445.   Prototype in        finance.h
  23446.   
  23447.   Remarks             given the cost, salvage value and life of an item,
  23448.                       sum_year_digits_dep will calculate the amount of
  23449.                       deprecitation for the given period according to the
  23450.                       sum of the years digits depreciation method. The
  23451.                       cost and salvage can be given in any unit (dollars,
  23452.                       thousands of dollars, etc.) but the life should be
  23453.                       given in depreciable periods (if you depreciate an
  23454.                       item every quarter, and the item has a life of 2
  23455.                       years, then life should be 8).
  23456.   
  23457.                       The cost and salvage values should be in the same
  23458.                       units. The life and period should be given in the
  23459.                       same units.
  23460.   
  23461.                       No error checking is performed.
  23462.   
  23463.   Return value        returns the amount of depreciation for the given
  23464.                       period in the same units as the cost, as per the
  23465.                       sum of the years digits depreciation method.
  23466.   
  23467.   Note                The macro SYD(c,s,l,p) is defined in finance.h for
  23468.                       ease of use.
  23469.   
  23470.   See also            accum_dep(), depreciation(),
  23471.                       double_decline_bal_dep(), straight_line_dep()
  23472.   
  23473.   Example             see demonum.c
  23474.   
  23475.   
  23476.  
  23477.  
  23478.  
  23479.  
  23480.  
  23481.  
  23482.  
  23483.  
  23484.  
  23485.  
  23486.  
  23487.  
  23488.  
  23489.  
  23490.  
  23491.  
  23492.  
  23493.  
  23494.  
  23495.  
  23496.  
  23497.  
  23498.  
  23499.  
  23500.  
  23501.  
  23502.      TCHK 2.1                                                    Page 357
  23503.  
  23504.   
  23505.   Function             summation - calculate a summation of integers
  23506.   
  23507.   Syntax              int summation(int max);
  23508.   
  23509.   Prototype in        mathhk.h
  23510.   
  23511.   Remarks             summation calculates a summation denoted by Σ Xi
  23512.                       where i ranges from 1 to max. Beware of overflow,
  23513.                       calculations are done as ints.
  23514.   
  23515.   Return value        returns the summation denoted by Σ Xi where i
  23516.                       ranges from 1 to max. If max <= 1, summation
  23517.                       returns a 1.
  23518.   
  23519.   See also            average(), factorial(), stddev(), variance()
  23520.   
  23521.   Example             #include <mathhk.h>
  23522.   
  23523.                       main()
  23524.                       {
  23525.                            printf("Summation is %d\n",summation(10));
  23526.                       }
  23527.   
  23528.   Program output      Summation is 55
  23529.   
  23530.   
  23531.  
  23532.  
  23533.  
  23534.  
  23535.  
  23536.  
  23537.  
  23538.  
  23539.  
  23540.  
  23541.  
  23542.  
  23543.  
  23544.  
  23545.  
  23546.  
  23547.  
  23548.  
  23549.  
  23550.  
  23551.  
  23552.  
  23553.  
  23554.  
  23555.  
  23556.  
  23557.  
  23558.  
  23559.  
  23560.  
  23561.  
  23562.  
  23563.  
  23564.  
  23565.  
  23566.  
  23567.  
  23568.      TCHK 2.1                                                    Page 358
  23569.  
  23570.   
  23571.   Function             swap - swap two values
  23572.   
  23573.   Syntax              #include <mathhk.h>
  23574.                       (void) swap(x,y)
  23575.   
  23576.   Prototype in        mathhk.h
  23577.   
  23578.   Remarks             swap will swap two values, regardless of type, but
  23579.                       should be of equal type.
  23580.   
  23581.                       This function is a macro.
  23582.   
  23583.   Return value        nothing.
  23584.   
  23585.   
  23586.  
  23587.  
  23588.  
  23589.  
  23590.  
  23591.  
  23592.  
  23593.  
  23594.  
  23595.  
  23596.  
  23597.  
  23598.  
  23599.  
  23600.  
  23601.  
  23602.  
  23603.  
  23604.  
  23605.  
  23606.  
  23607.  
  23608.  
  23609.  
  23610.  
  23611.  
  23612.  
  23613.  
  23614.  
  23615.  
  23616.  
  23617.  
  23618.  
  23619.  
  23620.  
  23621.  
  23622.  
  23623.  
  23624.  
  23625.  
  23626.  
  23627.  
  23628.  
  23629.  
  23630.  
  23631.  
  23632.  
  23633.  
  23634.      TCHK 2.1                                                    Page 359
  23635.  
  23636.   
  23637.   Function             time_convert - convert time formats
  23638.   
  23639.   Syntax              boolean time_convert(void *source, void *dest,
  23640.                                            int stype, int dtype);
  23641.   
  23642.   Prototype in        timehk.h
  23643.   
  23644.   Remarks             time_convert will convert a time from virtually any
  23645.                       time format to any other. The parameters *source
  23646.                       and *dest must be pointers pointing to a piece of
  23647.                       memory allocated as the proper data type. stype and
  23648.                       dtype determine the format of source and dest.
  23649.   
  23650.                       Due to the great number of formats supported, a
  23651.                       chart of valid time formats is provided in Appendix
  23652.                       C.
  23653.   
  23654.                       Limited error checking is done on passed data. If
  23655.                       an invalid time format is passed, unpredictable
  23656.                       results will occur.
  23657.   
  23658.   Return value        returns TRUE is the conversion was successful and
  23659.                       FALSE if the time could not be converted.
  23660.   
  23661.   Note                This function does NO function calls. I've tried to
  23662.                       optimize this function as much as possible for
  23663.                       speed, not size. If you only need to convert
  23664.                       between a couple of specific formats, you may be
  23665.                       better off doing a pair of sprintfs.
  23666.   
  23667.   See also            Appendix C
  23668.                       strtotime(), timetostr()
  23669.   
  23670.   Example             see demotime.c
  23671.   
  23672.  
  23673.  
  23674.  
  23675.  
  23676.  
  23677.  
  23678.  
  23679.  
  23680.  
  23681.  
  23682.  
  23683.  
  23684.  
  23685.  
  23686.  
  23687.  
  23688.  
  23689.  
  23690.  
  23691.  
  23692.  
  23693.  
  23694.  
  23695.  
  23696.  
  23697.  
  23698.  
  23699.  
  23700.      TCHK 2.1                                                    Page 360
  23701.  
  23702.   
  23703.   Function             timetostr - convert time structure to a string
  23704.   
  23705.   Syntax              char *timetostr(struct time *tsource,
  23706.                                       boolean seconds, boolean hundreds,
  23707.                                       boolean ampm);
  23708.   
  23709.   Prototype in        timehk.h
  23710.   
  23711.   Remarks             timetostr converts a time structure to a string,
  23712.                       with the following options:
  23713.   
  23714.                            seconds   = put seconds in string
  23715.                            hundreds  = put hundreths of seconds in string
  23716.                            ampm      = append AM/PM to string
  23717.   
  23718.                       if ampm is FALSE, 24-hour time will be used.
  23719.   
  23720.                       if hundreds is TRUE, seconds are automatically put
  23721.                       into the string.
  23722.   
  23723.   Return value        returns a pointer to the storage location
  23724.                       containing the time string, or NULL if space could
  23725.                       not be allocated.
  23726.   
  23727.   See also            strtotime()
  23728.   
  23729.   Example             #include <timehk.h>
  23730.   
  23731.                       main()
  23732.                       {
  23733.                            char *strnow;
  23734.                            struct time now;
  23735.   
  23736.                            gettime(&now);
  23737.                            if ((strnow = timetostr(&now, FALSE, TRUE,
  23738.                                                    TRUE)) != NULL)
  23739.                                 printf("The time is %s\n",strnow);
  23740.                       }
  23741.   
  23742.   Program output      The time is 11:23:14.22 PM
  23743.   
  23744.  
  23745.  
  23746.  
  23747.  
  23748.  
  23749.  
  23750.  
  23751.  
  23752.  
  23753.  
  23754.  
  23755.  
  23756.  
  23757.  
  23758.  
  23759.  
  23760.  
  23761.  
  23762.  
  23763.  
  23764.  
  23765.  
  23766.      TCHK 2.1                                                    Page 361
  23767.  
  23768.   
  23769.   Function             to24hour - converts hours to 24-hour format
  23770.   
  23771.   Syntax              #include <timehk.h>
  23772.                       (int) to24hour(hr)
  23773.   
  23774.   Prototype in        timehk.h
  23775.   
  23776.   Remarks             converts midnight (0) to the 24th hour.
  23777.   
  23778.   Return value        returns 0 if hr is midnight (0), otherwise returns
  23779.                       hr.
  23780.   
  23781.   See also            isPM(), time_convert(), tohour()
  23782.   
  23783.   
  23784.  
  23785.  
  23786.  
  23787.  
  23788.  
  23789.  
  23790.  
  23791.  
  23792.  
  23793.  
  23794.  
  23795.  
  23796.  
  23797.  
  23798.  
  23799.  
  23800.  
  23801.  
  23802.  
  23803.  
  23804.  
  23805.  
  23806.  
  23807.  
  23808.  
  23809.  
  23810.  
  23811.  
  23812.  
  23813.  
  23814.  
  23815.  
  23816.  
  23817.  
  23818.  
  23819.  
  23820.  
  23821.  
  23822.  
  23823.  
  23824.  
  23825.  
  23826.  
  23827.  
  23828.  
  23829.  
  23830.  
  23831.  
  23832.      TCHK 2.1                                                    Page 362
  23833.  
  23834.   
  23835.   Function             tocapkey - convert the key code to uppercase
  23836.   
  23837.   Syntax              int tocapkey(int k);
  23838.   
  23839.   Prototype in        keyboard.h
  23840.   
  23841.   Remarks             if the key code k is a letter, it is converted to
  23842.                       upper case.
  23843.   
  23844.   Return value        if the key code is a lower case letter, tocapkey
  23845.                       returns the upper case of that letter, otherwise
  23846.                       tocapkey returns the key code unchanged
  23847.   
  23848.   See also            inkeyc(), inkeycdv()
  23849.   
  23850.  
  23851.  
  23852.  
  23853.  
  23854.  
  23855.  
  23856.  
  23857.  
  23858.  
  23859.  
  23860.  
  23861.  
  23862.  
  23863.  
  23864.  
  23865.  
  23866.  
  23867.  
  23868.  
  23869.  
  23870.  
  23871.  
  23872.  
  23873.  
  23874.  
  23875.  
  23876.  
  23877.  
  23878.  
  23879.  
  23880.  
  23881.  
  23882.  
  23883.  
  23884.  
  23885.  
  23886.  
  23887.  
  23888.  
  23889.  
  23890.  
  23891.  
  23892.  
  23893.  
  23894.  
  23895.  
  23896.  
  23897.  
  23898.      TCHK 2.1                                                    Page 363
  23899.  
  23900.   
  23901.   Function             todosdate - make a DOS file date stamp
  23902.   
  23903.   Syntax              #include <doshk.h>
  23904.                       (unsigned) todosdate(y,m,d)
  23905.   
  23906.   Prototype in        doshk.h
  23907.   
  23908.   Remarks             makes a DOS file date stamp. Refer to a DOS
  23909.                       reference book (Advanced MS-DOS by Ray Duncan
  23910.                       recommended) for further details.
  23911.   
  23912.                       This function is a macro.
  23913.   
  23914.   Return value        returns the DOS file date stamp.
  23915.   
  23916.   See also            dosday(), doshour(), dosmonth(), dosmin(),
  23917.                       dossec(), dosyear(), todostime()
  23918.   
  23919.   
  23920.  
  23921.  
  23922.  
  23923.  
  23924.  
  23925.  
  23926.  
  23927.  
  23928.  
  23929.  
  23930.  
  23931.  
  23932.  
  23933.  
  23934.  
  23935.  
  23936.  
  23937.  
  23938.  
  23939.  
  23940.  
  23941.  
  23942.  
  23943.  
  23944.  
  23945.  
  23946.  
  23947.  
  23948.  
  23949.  
  23950.  
  23951.  
  23952.  
  23953.  
  23954.  
  23955.  
  23956.  
  23957.  
  23958.  
  23959.  
  23960.  
  23961.  
  23962.  
  23963.  
  23964.      TCHK 2.1                                                    Page 364
  23965.  
  23966.   
  23967.   Function             todostime - make a DOS file time stamp
  23968.   
  23969.   Syntax              #include <doshk.h>
  23970.                       (unsigned) todostime(h,m,s)
  23971.   
  23972.   Prototype in        doshk.h
  23973.   
  23974.   Remarks             makes a DOS file time stamp. Refer to a DOS
  23975.                       reference book (Advanced MS-DOS by Ray Duncan
  23976.                       recommended) for further details.
  23977.   
  23978.                       This function is a macro.
  23979.   
  23980.   Return value        returns the DOS file time stamp.
  23981.   
  23982.   See also            dosday(), doshour(), dosmonth(), dosmin(),
  23983.                       dossec(), dosyear(), todosdate()
  23984.   
  23985.   
  23986.  
  23987.  
  23988.  
  23989.  
  23990.  
  23991.  
  23992.  
  23993.  
  23994.  
  23995.  
  23996.  
  23997.  
  23998.  
  23999.  
  24000.  
  24001.  
  24002.  
  24003.  
  24004.  
  24005.  
  24006.  
  24007.  
  24008.  
  24009.  
  24010.  
  24011.  
  24012.  
  24013.  
  24014.  
  24015.  
  24016.  
  24017.  
  24018.  
  24019.  
  24020.  
  24021.  
  24022.  
  24023.  
  24024.  
  24025.  
  24026.  
  24027.  
  24028.  
  24029.  
  24030.      TCHK 2.1                                                    Page 365
  24031.  
  24032.   
  24033.   Function             tohour - converts 24-hour format to 12-hour
  24034.   
  24035.   Syntax              #include <timehk.h>
  24036.                       (int) tohour(hr)
  24037.   
  24038.   Prototype in        timehk.h
  24039.   
  24040.   Remarks             converts hr from 24-hour time to 12-hour time.
  24041.   
  24042.   Return value        returns the hour of the day, as would appear on a
  24043.                       12-hour clock (1-12).
  24044.   
  24045.   See also            isPM(), time_convert(), to24hour()
  24046.   
  24047.   
  24048.  
  24049.  
  24050.  
  24051.  
  24052.  
  24053.  
  24054.  
  24055.  
  24056.  
  24057.  
  24058.  
  24059.  
  24060.  
  24061.  
  24062.  
  24063.  
  24064.  
  24065.  
  24066.  
  24067.  
  24068.  
  24069.  
  24070.  
  24071.  
  24072.  
  24073.  
  24074.  
  24075.  
  24076.  
  24077.  
  24078.  
  24079.  
  24080.  
  24081.  
  24082.  
  24083.  
  24084.  
  24085.  
  24086.  
  24087.  
  24088.  
  24089.  
  24090.  
  24091.  
  24092.  
  24093.  
  24094.  
  24095.  
  24096.      TCHK 2.1                                                    Page 366
  24097.  
  24098.   
  24099.   Function             Tone - play a tone
  24100.   
  24101.   Syntax              void Tone(unsigned frequency, unsigned duration);
  24102.   
  24103.   Prototype in        sound.h
  24104.   
  24105.   Remarks             Tone() will play a tone of a specific frequency for
  24106.                       duration milliseconds. See sound.h for definitions
  24107.                       of common tones.
  24108.   
  24109.   Return value        returns nothing.
  24110.   
  24111.   See also            beep()
  24112.   
  24113.   Example             #include <sound.h>
  24114.   
  24115.                       main()
  24116.                       {
  24117.                            Tone(sA4s,2000u);
  24118.                            /* play A sharp for 2 seconds */
  24119.                       }
  24120.   
  24121.   
  24122.  
  24123.  
  24124.  
  24125.  
  24126.  
  24127.  
  24128.  
  24129.  
  24130.  
  24131.  
  24132.  
  24133.  
  24134.  
  24135.  
  24136.  
  24137.  
  24138.  
  24139.  
  24140.  
  24141.  
  24142.  
  24143.  
  24144.  
  24145.  
  24146.  
  24147.  
  24148.  
  24149.  
  24150.  
  24151.  
  24152.  
  24153.  
  24154.  
  24155.  
  24156.  
  24157.  
  24158.  
  24159.  
  24160.  
  24161.  
  24162.      TCHK 2.1                                                    Page 367
  24163.  
  24164.   
  24165.   Function             uninstallWhoa - uninstall WHOA!.COM by Brad
  24166.                                         Crandall
  24167.   
  24168.   Syntax              boolean uninstallWhoa(void);
  24169.   
  24170.   Prototype in        doshk.h
  24171.   
  24172.   Remarks             removes WHOA!.COM from memory (system slow-down
  24173.                       utility by Brad Crandall).
  24174.   
  24175.   Return value        returns TRUE if WHOA!.COM is successfully
  24176.                       uninstalled, FALSE otherwise.
  24177.   
  24178.   See also            isWhoa(), setWhoa()
  24179.   
  24180.   Example             #include <doshk.h>
  24181.   
  24182.                       main()
  24183.                       {
  24184.                            if (isWhoa()) {
  24185.                                 printf("Whoa! is ");
  24186.                                 if (! uninstallWhoa())
  24187.                                      printf("not ");
  24188.                                 printf("successfully uninstalled\n");
  24189.                            } else
  24190.                                 printf("Whoa! is not installed");
  24191.                       }
  24192.   
  24193.  
  24194.  
  24195.  
  24196.  
  24197.  
  24198.  
  24199.  
  24200.  
  24201.  
  24202.  
  24203.  
  24204.  
  24205.  
  24206.  
  24207.  
  24208.  
  24209.  
  24210.  
  24211.  
  24212.  
  24213.  
  24214.  
  24215.  
  24216.  
  24217.  
  24218.  
  24219.  
  24220.  
  24221.  
  24222.  
  24223.  
  24224.  
  24225.  
  24226.  
  24227.  
  24228.      TCHK 2.1                                                    Page 368
  24229.  
  24230.   
  24231.   Function             valid_date - check if a date is valid
  24232.   
  24233.   Syntax              boolean valid_date(int month, int day,
  24234.                                          int yearnum);
  24235.   
  24236.   Prototype in        datehk.h
  24237.   
  24238.   Remarks             valid_date checks if the given date is valid.
  24239.   
  24240.   Return value        returns TRUE if the date is valid, FALSE otherwise.
  24241.   
  24242.   See also            isleapyear()
  24243.   
  24244.   Example             #include <datehk.h>
  24245.   
  24246.                       main()
  24247.                       {
  24248.                            int i, d[3] = { 11,5,2 }, m[3] = { 31,12,29};
  24249.                            int y[3] = { 70, 1987, 1981 };
  24250.   
  24251.                            for (i=0; i<3; ++) {
  24252.                                 printf("%d/%d/%d  ", m[i], d[i], y[i]);
  24253.                                 if (valid_date(m[i], d[i], y[i])
  24254.                                      printf("valid\n");
  24255.                                 else
  24256.                                      printf("INVALID\n");
  24257.                            }
  24258.                       }
  24259.   
  24260.   Program output      11/31/70  INVALID        /* Nov has 30 days */
  24261.                       5/13/1987  valid
  24262.                       2/29/1981  INVALID       /* 1981 not a leap year */
  24263.   
  24264.  
  24265.  
  24266.  
  24267.  
  24268.  
  24269.  
  24270.  
  24271.  
  24272.  
  24273.  
  24274.  
  24275.  
  24276.  
  24277.  
  24278.  
  24279.  
  24280.  
  24281.  
  24282.  
  24283.  
  24284.  
  24285.  
  24286.  
  24287.  
  24288.  
  24289.  
  24290.  
  24291.  
  24292.  
  24293.  
  24294.      TCHK 2.1                                                    Page 369
  24295.  
  24296.   
  24297.   Function             variance - calculate the variance of a set of
  24298.                                    reals
  24299.   
  24300.   Syntax              double variance(int n, double element[]);
  24301.   
  24302.   Prototype in        mathhk.h
  24303.   
  24304.   Remarks             variance calculates the variance of a set of n
  24305.                       numbers of type double.
  24306.   
  24307.   Return value        returns the variance of a set of n numbers.
  24308.   
  24309.   See also            average(), stddev(), summation()
  24310.   
  24311.   Example             #include <mathhk.h>
  24312.   
  24313.                       main()
  24314.                       {
  24315.                            double num[] = { 2.3, 7.1, 6.05 };
  24316.   
  24317.                            printf("Variance is %lf\n",variance(3,num));
  24318.                       }
  24319.   
  24320.   Program output      Variance is 4.245
  24321.   
  24322.   
  24323.  
  24324.  
  24325.  
  24326.  
  24327.  
  24328.  
  24329.  
  24330.  
  24331.  
  24332.  
  24333.  
  24334.  
  24335.  
  24336.  
  24337.  
  24338.  
  24339.  
  24340.  
  24341.  
  24342.  
  24343.  
  24344.  
  24345.  
  24346.  
  24347.  
  24348.  
  24349.  
  24350.  
  24351.  
  24352.  
  24353.  
  24354.  
  24355.  
  24356.  
  24357.  
  24358.  
  24359.  
  24360.      TCHK 2.1                                                    Page 370
  24361.  
  24362.   
  24363.   Function             vert_line - draw a vertical line
  24364.   
  24365.   Syntax              void vert_line(byte c, int len, int col, int row);
  24366.   
  24367.   Prototype in        video.h
  24368.   
  24369.   Remarks             draws a vertical line of characters c of length len
  24370.                       beginning at (col,row) via INTerrupts, using the
  24371.                       current char_attribute setting for color. Screen
  24372.                       coordinates are absolute.
  24373.   
  24374.                       horiz_line does no error checking on the passed
  24375.                       parameters.
  24376.   
  24377.   Return value        nothing.
  24378.   
  24379.   See also            box(), horiz_line()
  24380.   
  24381.   Example             #include <video.h>
  24382.   
  24383.                       main()
  24384.                       {
  24385.                            vert_line('*',7,4,4);    /* draw 7 *'s */
  24386.                       }
  24387.   
  24388.   
  24389.  
  24390.  
  24391.  
  24392.  
  24393.  
  24394.  
  24395.  
  24396.  
  24397.  
  24398.  
  24399.  
  24400.  
  24401.  
  24402.  
  24403.  
  24404.  
  24405.  
  24406.  
  24407.  
  24408.  
  24409.  
  24410.  
  24411.  
  24412.  
  24413.  
  24414.  
  24415.  
  24416.  
  24417.  
  24418.  
  24419.  
  24420.  
  24421.  
  24422.  
  24423.  
  24424.  
  24425.  
  24426.      TCHK 2.1                                                    Page 371
  24427.  
  24428.   
  24429.   Function             whereh - X-coordinate of cursor 
  24430.   
  24431.   Syntax              int whereh(void);
  24432.   
  24433.   Prototype in        video.h
  24434.   
  24435.   Remarks             returns the X-coordinate (column) of the cursor's
  24436.                       current location via INT 0x10, Service 3.
  24437.   
  24438.   Return value        returns the X-coordinate of the cursor's current
  24439.                       location.
  24440.   
  24441.   See also            gotohv(), read_cursor(), wherev()
  24442.   
  24443.   Example             #include <video.h>
  24444.   
  24445.                       main()
  24446.                       {
  24447.                            printf("Cursor's column = %d\n",whereh());
  24448.                       }
  24449.   
  24450.   Program output      Cursor's column = 12
  24451.   
  24452.  
  24453.  
  24454.  
  24455.  
  24456.  
  24457.  
  24458.  
  24459.  
  24460.  
  24461.  
  24462.  
  24463.  
  24464.  
  24465.  
  24466.  
  24467.  
  24468.  
  24469.  
  24470.  
  24471.  
  24472.  
  24473.  
  24474.  
  24475.  
  24476.  
  24477.  
  24478.  
  24479.  
  24480.  
  24481.  
  24482.  
  24483.  
  24484.  
  24485.  
  24486.  
  24487.  
  24488.  
  24489.  
  24490.  
  24491.  
  24492.      TCHK 2.1                                                    Page 372
  24493.  
  24494.   
  24495.   Function             wherev - Y-coordinate of cursor 
  24496.   
  24497.   Syntax              int wherev(void);
  24498.   
  24499.   Prototype in        video.h
  24500.   
  24501.   Remarks             returns the Y-coordinate (row) of the cursor's
  24502.                       current location via INT 0x10, Service 3.
  24503.   
  24504.   Return value        returns the Y-coordinate of the cursor's current
  24505.                       location.
  24506.   
  24507.   See also            gotohv(), read_cursor(), whereh()
  24508.   
  24509.   Example             #include <video.h>
  24510.   
  24511.                       main()
  24512.                       {
  24513.                            printf("Cursor's row = %d\n",wherev());
  24514.                       }
  24515.   
  24516.   Program output      Cursor's row = 4
  24517.   
  24518.   
  24519.  
  24520.  
  24521.  
  24522.  
  24523.  
  24524.  
  24525.  
  24526.  
  24527.  
  24528.  
  24529.  
  24530.  
  24531.  
  24532.  
  24533.  
  24534.  
  24535.  
  24536.  
  24537.  
  24538.  
  24539.  
  24540.  
  24541.  
  24542.  
  24543.  
  24544.  
  24545.  
  24546.  
  24547.  
  24548.  
  24549.  
  24550.  
  24551.  
  24552.  
  24553.  
  24554.  
  24555.  
  24556.  
  24557.  
  24558.      TCHK 2.1                                                    Page 373
  24559.  
  24560.   
  24561.                                    Index
  24562.   
  24563.   
  24564.   _cursorinsert  131, 145
  24565.   _cursoroverwrite    131, 145
  24566.   _dvmajor  148, 149
  24567.   _mouse1   183, 227, 228, 245
  24568.   _mouse2   183, 227, 228, 229, 244, 245
  24569.   _mouse3   227, 228, 229, 244, 245, 249, 250
  24570.   _mouse4   227, 228, 229, 244, 245, 249, 250
  24571.   _rmatherror    223
  24572.   _r_maximum     301
  24573.   _r_maxpre 301
  24574.   _r_minpre 288, 289, 298, 300, 301, 305, 306
  24575.   _shadowchar    327
  24576.   _shadowcolor   327
  24577.   _shadowstyle   327
  24578.   
  24579.   
  24580.   A
  24581.   Accum_dep 8, 60, 97, 335, 356
  24582.   ACC_DDB   8
  24583.   ACC_SLD   8
  24584.   ACC_SYD   8
  24585.   Ansiback  10, 11, 12
  24586.   Ansifore  10, 11, 12
  24587.   Ansi_call 9, 11, 12
  24588.   Atrim     13
  24589.   Average   14, 334, 357, 369
  24590.   
  24591.   
  24592.   B
  24593.   Beep 15, 66, 366
  24594.   Bitrevb   16, 17, 18
  24595.   Bitrevl   16, 17, 18
  24596.   Bitrevw   16, 17, 18
  24597.   Box  19, 20, 21, 29, 144, 195, 213, 214, 267, 309, 310, 327, 370
  24598.   Boxwindow 19, 20, 21, 213, 267, 327
  24599.   
  24600.   
  24601.   C
  24602.   Cal...    22, 53, 57, 58, 59, 116, 143, 210, 251, 329, 351
  24603.   CapsLock  23, 151, 261, 311
  24604.   CEDadd    24, 25, 164
  24605.   CEDremove 24, 25, 164
  24606.   Center    20, 21, 26, 131, 213, 267
  24607.   Changelitebar  27, 216, 217, 218, 219, 220, 221, 240
  24608.   Char_attribute 144, 283, 284, 285, 312, 370
  24609.   Checksum_block 28, 45, 46, 47, 48
  24610.   Clear     9, 29, 30, 31
  24611.   Clear_typeahead     30
  24612.   Cls  9, 29, 31
  24613.   
  24614.  
  24615.  
  24616.  
  24617.  
  24618.  
  24619.  
  24620.  
  24621.  
  24622.  
  24623.  
  24624.      TCHK 2.1                                                    Page 374
  24625.  
  24626.   Color                              9, 10, 11, 12, 20, 21, 32, 37, 40,
  24627.                                      144, 165, 214, 219, 221, 268, 275,
  24628.                                      276, 283, 284, 285, 312, 327, 370
  24629.   Commit                             33
  24630.   Compaq386GetCpuSpeed               34, 35, 36
  24631.   Compaq386GetCpuSpeed               34, 35, 36
  24632.   Compaq386KbdType                   34, 35, 36
  24633.   CompaqExternalMonitorType          37, 38, 39, 40, 41, 42, 43
  24634.   CompaqGetMasterMode                37, 38, 39, 40, 41, 42, 43
  24635.   CompaqGetMonitor                   37, 38, 39, 40, 41, 42, 43
  24636.   CompaqInternalMonitorType          37, 38, 39, 40, 41, 42, 43
  24637.   CompaqModeSwitchDelay              37, 38, 39, 40, 41, 42, 43
  24638.   CompaqSelectMonitor                37, 38, 39, 40, 41, 42, 43
  24639.   CompaqSetMasterMode                37, 38, 39, 40, 41, 42, 43
  24640.   Cpu_id                             44, 226, 259
  24641.   CRC16tupdate                       28, 45, 46, 47, 48
  24642.   CRC16update                        28, 45, 46, 47, 48
  24643.   CRC16_block                        28, 45, 46, 47, 48
  24644.   CRC32tupdate                       28, 45, 46, 47, 48
  24645.   Cursor_blink                       49, 50, 51, 52, 125, 293, 313, 319
  24646.   Cursor_flip                        49, 50, 51, 52, 125, 293, 313, 319
  24647.   CURSOR_HALFBLOCK                   50, 145
  24648.   Cursor_off                         49, 50, 51, 52, 125, 293, 313, 319
  24649.   Cursor_on                          49, 50, 51, 52, 125, 293, 313, 319
  24650.   CURSOR_UNDERBAR                    50, 145
  24651.   
  24652.   
  24653.   D
  24654.   Date_convert                       22, 53, 57, 58, 59, 116, 143, 210,
  24655.                                      251, 329, 351
  24656.   Dayofweek                          54, 55
  24657.   Dayofyear                          55, 56, 87
  24658.   Daysleft                           55, 56, 87
  24659.   Ddatetofull                        22, 53, 57, 58, 59, 116, 143, 210,
  24660.                                      251, 329, 351
  24661.   Ddatetoshort                       22, 53, 57, 58, 59, 116, 143, 210,
  24662.                                      251, 329, 351
  24663.   Ddatetostr                         22, 53, 57, 58, 59, 116, 143, 210,
  24664.                                      251, 329, 351
  24665.   DDB                                8, 97
  24666.   Depreciation                       8, 60, 97, 335, 356
  24667.   DESQapilevel                       61, 86
  24668.   DESQappnum                         62
  24669.   DESQbeginc                         63, 67
  24670.   DESQcommonmem                      64, 65, 69
  24671.   DESQconvenmem                      64, 65, 69
  24672.   DESQdisperror                      66, 78
  24673.   DESQendc                           63, 67
  24674.   DESQexit                           68
  24675.   DESQexpandedmem                    64, 65, 69
  24676.   DESQgetbuf                         70
  24677.   DESQgetmem                         71, 81
  24678.   DESQiskmouse                       72, 74, 75
  24679.   DESQjustify                        73
  24680.   
  24681.  
  24682.  
  24683.  
  24684.  
  24685.  
  24686.  
  24687.  
  24688.  
  24689.  
  24690.      TCHK 2.1                                                    Page 375
  24691.  
  24692.   DESQkmouse_off                     72, 74, 75
  24693.   DESQkmouse_on                      72, 74, 75
  24694.   DESQostack                         76, 85
  24695.   DESQpause                          77, 79, 83, 84
  24696.   DESQpoke                           78
  24697.   DESQposttask                       77, 79, 83, 84
  24698.   DESQpushkey                        80
  24699.   DESQputmem                         71, 81
  24700.   DESQsound                          82
  24701.   DESQstart                          77, 79, 83, 84
  24702.   DESQstop                           77, 79, 83, 84
  24703.   DESQustack                         76, 85
  24704.   DESQversion                        61, 86, 148, 149
  24705.   Diffddate                          55, 56, 87
  24706.   DISABLED                           214, 267
  24707.   Diskchanged                        88, 89
  24708.   Disktype                           88, 89
  24709.   Dosday                             90, 91, 92, 93, 94, 96, 363, 364
  24710.   Doshour                            90, 91, 92, 93, 94, 96, 363, 364
  24711.   Dosmin                             90, 91, 92, 93, 94, 96, 363, 364
  24712.   Dosmonth                           90, 91, 92, 93, 94, 96, 363, 364
  24713.   Dossec                             90, 91, 92, 93, 94, 96, 363, 364
  24714.   Dostimetolong                      95, 222
  24715.   Dosyear                            90, 91, 92, 93, 94, 96, 363, 364
  24716.   DoubleDOSfreeCPU                   98, 99, 100, 168, 180
  24717.   DoubleDOSGetVirtual                98, 99, 100, 168, 180
  24718.   DoubleDOSTaskSwitch                98, 99, 100, 168, 180
  24719.   Double_decline_bal_dep             8, 60, 97, 335, 356
  24720.   DVERROR_BEEP                       66
  24721.   DVERROR_EITHER                     66
  24722.   DVERROR_LEFT                       66
  24723.   DVERROR_RIGHT                      66
  24724.   
  24725.   
  24726.   E
  24727.   EMMversion                         101, 102, 103, 104, 105, 171
  24728.   EMSGetStatus                       101, 102, 103, 104, 105, 171
  24729.   EMSinfo                            102, 103, 171
  24730.   EMSpages                           101, 102, 103, 104, 105, 171
  24731.   EMSwarmbootprep                    101, 102, 103, 104, 105, 171
  24732.   ENABLED                            214, 267
  24733.   Endstri                            106, 107
  24734.   Endstrp                            107
  24735.   Expandfilespec                     108
  24736.   Extendedtotal                      109, 174
  24737.   
  24738.   
  24739.   F
  24740.   Factorial                          110, 357
  24741.   Fileexist                          111, 167
  24742.   Fname_match                        112, 113
  24743.   Fncmp                              112, 113
  24744.   Frac                               114, 301, 304
  24745.   Fsgn                               115, 177, 224
  24746.   
  24747.  
  24748.  
  24749.  
  24750.  
  24751.  
  24752.  
  24753.  
  24754.  
  24755.  
  24756.      TCHK 2.1                                                    Page 376
  24757.  
  24758.   Fulltoddate                        22, 53, 57, 58, 59, 116, 143, 210,
  24759.                                      251, 329, 351
  24760.   FV                                 117, 118, 266, 286, 287
  24761.   FVa                                117, 118, 266, 286, 287
  24762.   
  24763.   
  24764.   G
  24765.   GetAssignmemseg                    119, 159
  24766.   GetBootBlock                       120, 121, 122, 140
  24767.   GetBootBlock4                      120, 121, 122, 140
  24768.   GetBPB                             120, 121, 122, 140
  24769.   Getci_match                        124, 135
  24770.   Getcursor                          49, 50, 51, 52, 125, 293, 313, 319
  24771.   Getc_match                         123, 124, 134, 135, 141, 146, 147,
  24772.                                      148, 149
  24773.   Getdatehk                          126
  24774.   Getdouble                          127, 133, 137
  24775.   Getfilespec                        108, 128, 263, 264, 297
  24776.   Getfname                           129
  24777.   Getget                             129, 130, 131, 136, 138, 145
  24778.   Getint                             127, 133, 137
  24779.   Getk                               123, 124, 134, 135, 141, 146, 147,
  24780.                                      148, 149
  24781.   Getlogical                         123, 124, 134, 135, 141, 146, 147,
  24782.                                      148, 149
  24783.   Getpw                              136
  24784.   Getreal                            127, 133, 137
  24785.   Getstr                             132, 138
  24786.   GetTypePointDevice                 139, 296, 321, 322, 323
  24787.   GetVolSerialNum                    121, 140
  24788.   Getyn                              123, 124, 134, 135, 141, 146, 147,
  24789.                                      148, 149
  24790.   Gotohv                             19, 29, 142, 283, 285, 371, 372
  24791.   Greg...                            22, 53, 57, 58, 59, 116, 143, 210,
  24792.                                      251, 329, 351
  24793.   
  24794.   
  24795.   H
  24796.   Horiz_line                         19, 20, 144, 370
  24797.   
  24798.   
  24799.   I
  24800.   Initkeyvars                        145
  24801.   Inkey                              30, 123, 124, 126, 127, 130, 131,
  24802.                                      132, 133, 134, 135, 136, 137, 138,
  24803.                                      141, 145, 146, 147, 148, 149, 166,
  24804.                                      175, 188, 205, 211, 215, 268, 362
  24805.   Inkeyc                             134, 135, 141, 146, 147, 148, 149,
  24806.                                      215, 268, 362
  24807.   Inkeycdv                           146, 147, 148, 149, 215, 268
  24808.   Inkeydv                            131, 132, 146, 147, 148, 149, 215,
  24809.                                      268
  24810.   InsLock                            23, 151, 261, 311
  24811.   Intlen                             150
  24812.   
  24813.  
  24814.  
  24815.  
  24816.  
  24817.  
  24818.  
  24819.  
  24820.  
  24821.  
  24822.      TCHK 2.1                                                    Page 377
  24823.  
  24824.   Is2nd8259                          152
  24825.   Isallalpha                         153, 154, 155, 156
  24826.   Isallalphanum                      153, 154, 155, 156
  24827.   Isalllower                         153, 154, 155, 156
  24828.   Isallupper                         153, 154, 155, 156
  24829.   IsAnarkey                          157
  24830.   IsAppendavail                      158, 159, 197
  24831.   IsAssignavail                      119, 158, 159, 197
  24832.   IsAutoPark                         160, 316
  24833.   IsBlogical                         161
  24834.   IsBREAKon                          162, 199, 317, 325
  24835.   Iscdevicemoderaw                   163, 169, 178, 193, 194, 195
  24836.   IsCEDavail                         24, 25, 164
  24837.   IsCGA                              165
  24838.   Iscolor                            165
  24839.   Isdate                             166
  24840.   Isdir                              108, 111, 167
  24841.   IsDoubleDOS                        98, 99, 100, 168, 180
  24842.   Isdrivelocal                       163, 169, 178, 193, 194, 195, 318
  24843.   IsDriverSys                        170
  24844.   IsEGA                              165
  24845.   IsEMSavail                         101, 102, 103, 104, 105, 171
  24846.   IsEnhanceKbd                       172
  24847.   Iseven                             173, 187
  24848.   IsExtended                         109, 174
  24849.   Isfilename                         175, 188
  24850.   Isgameport                         176, 205, 206, 207, 208, 209
  24851.   Isgn                               115, 177, 224
  24852.   Ishandlelocal                      163, 169, 178, 193, 194, 195, 318
  24853.   IsHerc                             165
  24854.   IsHiliteable                       27, 179, 216, 217, 218, 219, 220,
  24855.                                      221, 240, 241, 269, 271, 272, 273,
  24856.                                      274, 275, 276
  24857.   IsInvisible                        98, 99, 100, 168, 180
  24858.   Isleapyear                         53, 181, 368
  24859.   IsMCA                              182
  24860.   IsMDA                              165
  24861.   Ismono                             165
  24862.   Ismouse                            183, 252
  24863.   IsNetwork                          184
  24864.   IsNLSFuncCom                       185
  24865.   IsNovellNetavail                   186
  24866.   Isodd                              173, 187
  24867.   Ispathname                         175, 188
  24868.   IspcAnywhere                       189, 320
  24869.   IsPM                               191, 361, 365
  24870.   IsPRINTavail                       190, 277, 278, 279, 280, 281, 282
  24871.   Isrealtimeclock                    192
  24872.   IsRedirectStdin                    163, 169, 178, 193, 194, 195, 318
  24873.   IsRedirectStdout                   163, 169, 178, 193, 194, 195, 318
  24874.   Isremoveable                       163, 169, 178, 193, 194, 195, 318
  24875.   IsScrnSav2                         196
  24876.   IsShareavail                       158, 159, 197
  24877.   Isstate                            198, 204, 333
  24878.   
  24879.  
  24880.  
  24881.  
  24882.  
  24883.  
  24884.  
  24885.  
  24886.  
  24887.  
  24888.      TCHK 2.1                                                    Page 378
  24889.  
  24890.   IsVERIFYon                         162, 199, 317, 325
  24891.   IsVidclock                         200
  24892.   IsWhoa                             201, 326, 367
  24893.   Iswildcarded                       202
  24894.   IsXMSinstalled                     203
  24895.   Iszip                              198, 204, 333
  24896.   
  24897.   
  24898.   J
  24899.   JoystickAx                         176, 205, 206, 207, 208, 209
  24900.   JoystickAy                         176, 205, 206, 207, 208, 209
  24901.   JoystickBx                         176, 205, 206, 207, 208, 209
  24902.   JoystickBy                         176, 205, 206, 207, 208, 209
  24903.   Joysticksettings                   176, 205, 206, 207, 208, 209
  24904.   Jul...                             22, 53, 57, 58, 59, 116, 143, 210,
  24905.                                      251, 329, 351
  24906.   
  24907.   
  24908.   K
  24909.   Keyclick                           211
  24910.   Key_extended                       134
  24911.   Key_status                         134
  24912.   
  24913.   
  24914.   L
  24915.   Leftstr                            212, 248, 299
  24916.   Litebarerrno                       27, 216, 217, 218, 219, 220, 221, 240
  24917.   Litebar_alloc                      27, 213, 217, 218, 219, 220, 221, 240
  24918.   Litebar_free                       27, 215, 216, 217, 218, 219, 220,
  24919.                                      221, 240
  24920.   Litebar_get                        27, 215, 216, 217, 218, 219, 220,
  24921.                                      221, 240
  24922.   Litehilite                         27, 216, 217, 218, 219, 220, 221, 240
  24923.   Litemessage                        27, 216, 217, 218, 219, 220, 221, 240
  24924.   Liteunlite                         216, 217, 218, 219, 220, 221, 240
  24925.   Longtodostime                      95, 222
  24926.   Lpow                               223
  24927.   Lsgn                               115, 177, 224
  24928.   Ltrim                              225
  24929.   
  24930.   
  24931.   M
  24932.   Machine_id                         44, 182, 226, 259, 302, 303
  24933.   MAXDOUBLE                          110
  24934.   MButtonPress                       227, 228, 229
  24935.   MButtonRelease                     227, 228, 229
  24936.   MButtonStatus                      227, 228, 229
  24937.   MCursorGraphic                     230, 231, 232, 233, 234, 235, 246
  24938.   MCursorOff                         230, 231, 232, 233, 234, 235, 246
  24939.   MCursorOn                          230, 231, 232, 233, 234, 235, 246,
  24940.                                      258
  24941.   MCursorRangex                      230, 231, 232, 233, 234, 235, 246
  24942.   MCursorRangey                      230, 231, 232, 233, 234, 235, 246
  24943.   MCursorText                        230, 231, 232, 233, 234, 235, 246
  24944.   
  24945.  
  24946.  
  24947.  
  24948.  
  24949.  
  24950.  
  24951.  
  24952.  
  24953.  
  24954.      TCHK 2.1                                                    Page 379
  24955.  
  24956.   MDriverSize                        236, 243, 253
  24957.   Memory_strategy                    237
  24958.   MEmulateLightpenOff                238, 239
  24959.   MEmulateLightpenOn                 238, 239
  24960.   Menu_litebar                       27, 216, 217, 218, 219, 220, 221, 240
  24961.   Menu_popup                         241, 269, 271, 272, 273, 274, 275,
  24962.                                      276
  24963.   MGetDisplayPage                    242, 254
  24964.   MGetDriver                         236, 243, 253
  24965.   MGetSensitivity                    244, 255, 256, 257
  24966.   MGetVerType                        183, 245, 252
  24967.   MGotoxy                            230, 231, 232, 233, 234, 235, 246
  24968.   Mid                                95, 212, 227, 228, 229, 247, 248,
  24969.                                      260, 299, 361
  24970.   Midstr                             212, 248, 299
  24971.   MMickeysMovedx                     249, 250
  24972.   MMickeysMovedy                     249, 250
  24973.   Monthexpand                        22, 53, 57, 58, 59, 116, 143, 210,
  24974.                                      251, 329, 351
  24975.   MouseReset                         183, 252
  24976.   MPutDriver                         236, 243, 253
  24977.   MSetDisplayPage                    242, 254
  24978.   MSetRatio                          244, 255, 256, 257
  24979.   MSetSensitivity                    244, 255, 256, 257
  24980.   MSetThreshold                      244, 255, 256, 257
  24981.   MUpdateScreen                      258
  24982.   
  24983.   
  24984.   N
  24985.   Ndp_id                             44, 226, 259
  24986.   Nmid                               247, 260
  24987.   NOTOPTION                          214, 267, 268
  24988.   NumLock                            23, 151, 261, 311
  24989.   
  24990.   
  24991.   P
  24992.   Parsefilename                      108, 128, 262, 263, 264, 297
  24993.   Parsefnameext                      108, 128, 263, 264, 297
  24994.   Pause                              265
  24995.   PMT                                117, 118, 266, 286, 287
  24996.   Pophilite                          241, 270, 271, 272, 273, 274, 275,
  24997.                                      276
  24998.   Popunlite                          241, 270, 271, 272, 273, 274, 275,
  24999.                                      276
  25000.   Popuperrno                         241, 269, 270, 271, 272, 273, 274,
  25001.                                      275, 276
  25002.   Popup_alloc                        241, 267, 271, 272, 273, 274, 275,
  25003.                                      276
  25004.   Popup_free                         241, 268, 269, 271, 272, 273, 274,
  25005.                                      275, 276
  25006.   Popup_get                          241, 268, 269, 271, 272, 273, 274,
  25007.                                      275, 276
  25008.   Popup_restore                      241, 269, 271, 272, 273, 274, 275,
  25009.                                      276
  25010.   
  25011.  
  25012.  
  25013.  
  25014.  
  25015.  
  25016.  
  25017.  
  25018.  
  25019.  
  25020.      TCHK 2.1                                                    Page 380
  25021.  
  25022.   Popup_setcurrent                   241, 269, 271, 272, 273, 274, 275,
  25023.                                      276
  25024.   PRINTadd                           190, 277, 278, 279, 280, 281, 282
  25025.   PRINThold                          190, 277, 278, 279, 280, 281, 282
  25026.   PRINTpurge                         190, 277, 278, 279, 280, 281, 282
  25027.   PRINTremove                        190, 277, 278, 279, 280, 281, 282
  25028.   PRINTresume                        190, 277, 278, 279, 280, 281, 282
  25029.   Print_screen                       277
  25030.   Putk                               19, 29, 123, 283, 284, 285, 312
  25031.   Putsay                             283, 284, 285
  25032.   Putstr                             135, 141, 283, 284, 285, 312
  25033.   PV                                 117, 118, 266, 286, 287
  25034.   PVa                                117, 118, 266, 286, 287
  25035.   
  25036.   
  25037.   R
  25038.   Radd                               288, 289, 290, 298, 300, 301, 305,
  25039.                                      306
  25040.   Rceil                              288, 289, 290, 298, 300, 301, 305,
  25041.                                      306
  25042.   Rdiv                               288, 289, 290, 298, 300, 301, 305,
  25043.                                      306
  25044.   Read_attrib                        291, 292
  25045.   Read_char                          291, 292
  25046.   Read_cursor                        49, 50, 51, 52, 125, 142, 293, 313,
  25047.                                      319, 371, 372
  25048.   Read_mode                          294, 315
  25049.   Reboot                             295
  25050.   ResetPointDevice                   139, 296, 321, 322, 323
  25051.   Resolvepath                        128, 263, 264, 297
  25052.   Rfloor                             288, 289, 290, 298, 300, 301, 305,
  25053.                                      306
  25054.   Rightstr                           212, 248, 299
  25055.   Rnegate                            288, 289, 290, 298, 300, 301, 305,
  25056.                                      306
  25057.   Rnormalize                         288, 289, 290, 298, 300, 301, 305,
  25058.                                      306
  25059.   ROM_date                           182, 226, 302, 303
  25060.   ROM_id                             182, 226, 302, 303
  25061.   Round                              114, 289, 290, 298, 304, 352
  25062.   Rsign                              288, 289, 290, 298, 300, 301, 305,
  25063.                                      306
  25064.   Rsub                               288, 289, 290, 298, 300, 301, 305,
  25065.                                      306
  25066.   Rtrim                              307
  25067.   
  25068.   
  25069.   S
  25070.   Scrbuff                            20, 21, 308
  25071.   ScrollLock                         23, 311
  25072.   Scroll_down                        309, 310
  25073.   Scroll_up                          309, 310
  25074.   SetAutoPark                        316
  25075.   SetBREAK                           162, 199, 317, 325
  25076.   
  25077.  
  25078.  
  25079.  
  25080.  
  25081.  
  25082.  
  25083.  
  25084.  
  25085.  
  25086.      TCHK 2.1                                                    Page 381
  25087.  
  25088.   Setcdevicemoderaw                  318
  25089.   Setcursor                          49, 50, 51, 52, 125, 293, 313, 319
  25090.   SetpcAnywhere                      189, 320
  25091.   SetPointDevice                     139, 296, 321, 322, 323
  25092.   SetRatePointDevice                 139, 296, 321, 322, 323
  25093.   SetResPointDevice                  139, 296, 321, 322, 323
  25094.   Settextinfo                        215, 268, 324
  25095.   SetVERIFY                          162, 199, 317, 325
  25096.   SetWhoa                            201, 326, 367
  25097.   Set_color                          283, 284, 285, 312
  25098.   Set_cursor                         49, 50, 51, 52, 125, 293, 313, 319
  25099.   Set_handles                        314
  25100.   Set_mode                           9, 294, 315
  25101.   Shadow                             327
  25102.   SHADOW_B                           327
  25103.   SHADOW_BR                          327
  25104.   SHADOW_R                           327
  25105.   Shorttoddate                       22, 53, 57, 58, 59, 116, 143, 210,
  25106.                                      251, 329, 351
  25107.   SLD                                8, 335
  25108.   Soundex                            330, 331
  25109.   Sqr                                332
  25110.   Stateindex                         198, 204, 333
  25111.   States                             198, 333
  25112.   Stddev                             14, 334, 357, 369
  25113.   Straight_line_dep                  8, 60, 97, 335, 356
  25114.   Strcapital                         336
  25115.   Strclean                           337
  25116.   Strcomma                           150, 338, 350
  25117.   Strdel                             339
  25118.   Strfill                            340
  25119.   Strins                             341
  25120.   Stroccur                           342
  25121.   Strpadleft                         343, 344
  25122.   Strpadright                        343, 344
  25123.   Strrep                             340, 345
  25124.   Strshleft                          346
  25125.   Strshright                         347
  25126.   Strspace2tab                       348, 349
  25127.   Strtabexpand                       348, 349
  25128.   Strtocomma                         338, 350
  25129.   Strtoddate                         22, 53, 57, 58, 59, 116, 143, 210,
  25130.                                      251, 329, 351
  25131.   Strtodol                           352
  25132.   Strtotime                          353, 359, 360
  25133.   Struct BIOSParmBlock               122
  25134.   Struct BootBlock                   120, 121
  25135.   Struct BootBlock4                  121
  25136.   Struct ddate                       55, 56, 57, 58, 59, 87, 116, 210,
  25137.                                      329, 351
  25138.   Struct DESQmemory                  64, 65, 69
  25139.   Struct EMSrecord                   103, 104
  25140.   Struct filespec                    262, 263
  25141.   Struct fnameext                    264
  25142.   
  25143.  
  25144.  
  25145.  
  25146.  
  25147.  
  25148.  
  25149.  
  25150.  
  25151.  
  25152.      TCHK 2.1                                                    Page 382
  25153.  
  25154.   Struct litebar_field               27
  25155.   Struct litebar_header              27, 213, 217, 218, 219, 220, 221
  25156.   Struct popup_header                267, 271, 272, 273, 274, 275, 276
  25157.   Struct REAL                        288, 289, 290, 298, 300, 301, 305,
  25158.                                      306
  25159.   Strwcmp                            354, 355
  25160.   Strwicmp                           354, 355
  25161.   Summation                          14, 110, 334, 357, 369
  25162.   Sum_year_digits_dep                8, 60, 97, 335, 356
  25163.   Swap                               358
  25164.   SYD                                8, 356
  25165.   
  25166.   
  25167.   T
  25168.   Timetostr                          353, 359, 360
  25169.   Time_convert                       191, 359, 361, 365
  25170.   To24hour                           191, 361, 365
  25171.   Tocapkey                           146, 147, 148, 149, 362
  25172.   Todosdate                          90, 91, 92, 93, 94, 96, 363, 364
  25173.   Todostime                          90, 91, 92, 93, 94, 96, 363, 364
  25174.   Tohour                             191, 361, 365
  25175.   Tone                               15, 366
  25176.   
  25177.   
  25178.   U
  25179.   UDFIDLE                            131, 215, 269
  25180.   UninstallWhoa                      201, 326, 367
  25181.   
  25182.   
  25183.   V
  25184.   Valid_date                         181, 368
  25185.   Variance                           14, 334, 357, 369
  25186.   Vert_line                          19, 20, 144, 370
  25187.   
  25188.   
  25189.   W
  25190.   Whereh                             142, 293, 371, 372
  25191.   Wherev                             142, 293, 371, 372
  25192.   
  25193.   
  25194.  
  25195.  
  25196.  
  25197.  
  25198.  
  25199.  
  25200.  
  25201.  
  25202.  
  25203.  
  25204.  
  25205.  
  25206.  
  25207.  
  25208.  
  25209.  
  25210.  
  25211.  
  25212.  
  25213.